Metadata-Version: 2.5
Name: kilo
Version: 0.2.0
Summary: The house Django framework: envelope API idiom, settings defaults, auth (local + 2FA + passkeys + OIDC SSO), and SPA serving.
Requires-Python: >=3.12
Requires-Dist: django<6.2,>=6.1
Requires-Dist: djangorestframework>=3.16
Requires-Dist: httpx>=0.28
Requires-Dist: pillow>=11
Requires-Dist: pyotp>=2.9
Requires-Dist: python-dotenv>=1.0
Requires-Dist: qrcode>=8.2
Requires-Dist: webauthn>=2.7
Requires-Dist: whitenoise>=6.8
Provides-Extra: dburl
Requires-Dist: dj-database-url>=2.2; extra == 'dburl'
Provides-Extra: postgres
Requires-Dist: psycopg[binary,pool]>=3.2; extra == 'postgres'
Provides-Extra: sentry
Requires-Dist: sentry-sdk>=2.0; extra == 'sentry'
Description-Content-Type: text/markdown

# kilo (Django)

The house Django framework package. Provides:

- `kilo.core` — the `{success, data}` / `{success, message, errors}` envelope
  (`ok()`/`err()`), `TimestampedModel`, and the `authenticated_required` /
  `operator_required` decorators.
- `kilo.conf` — `install()` writes the shared settings blocks into a
  project's `settings.py`; `env_bool`/`env_int`/`env_list` helpers.
- `kilo.accounts` — email-keyed `User` (AppConfig label `accounts`), the
  two-step login protocol, TOTP/e-mail second factors, passkeys, step-up
  re-auth, generic OIDC SSO with pre-linked or auto-provision policy, all
  behind `KILO_AUTH` feature flags.
- `kilo.front` — SPA serving: `spa_index`, flat `/api/me/`, auth-checked
  media, the catch-all URL helper, and the packaged HTML shells
  (`index.html`, `login.html`, `login_sso.html`, `forgot_password.html`;
  projects override by shadowing the template name).

- `kilo.timing` — request and function timing pushed to Escalator: a
  middleware, a `timed` decorator/context manager, and `record()`. Depends on
  Django only, so it works in projects that use nothing else from kilo.
- `kilo.tenancy` + `kilo.platform` — pooled multi-tenancy (tenant model,
  host → tenant middleware, scoped managers, membership, export/import) and
  the cell machine API; opt-in via `install(tenancy=True)`.

See the kilo repo's CONVENTIONS.md and docs/ for the full contract.

## Tests

```bash
pytest --ds=tests.settings_local
pytest --ds=tests.settings_sso
```
