Skip to main content

NeoZen

Authentication and authorization for modern Python applications.

License: Apache 2.0 Python 3.12+

NeoZen (NeoZeN = AuthN + AuthZ) is a framework-agnostic authentication and authorization toolkit for Python. It is also, secondarily, a lightweight self-hostable identity provider you can stand up in front of one or more apps.

Status: 0.9 is the first public release. Docs, tests, packaging and the reference deployment are in good shape, but 0.9 is not yet semver-stable: the API may evolve before 1.0.

Two ways to use NeoZen

As a library

pip install neozen and embed it in your own Litestar, Starlette, Flask, or other Python web app. Bring your own User model. Pick the factors and storage backend you need.

pip install "neozen[sqlalchemy,password]"

See the Developer Quickstart: a runnable 80-line Litestar app in under five minutes.

As a self-hosted service

docker compose up -d to run NeoZen as its own IAM service with an admin console. Other apps talk to it over standard protocols.

cd deploy/docker
docker compose up -d
docker compose logs neozen | grep NEOZEN-BOOTSTRAP-CREDENTIALS -A 6

See the Self-Hosted Quickstart: a working self-hosted IAM in under ten minutes.

What NeoZen provides

  • Authentication: passwords (Argon2id), magic links, TOTP, email OTP, WebAuthn/passkeys, social login (Google, GitHub)
  • Authorization: role-based access control (RBAC), permissions, policy-based authorization
  • OAuth 2.1 server: authorization code with PKCE, refresh, client credentials
  • OpenID Connect 1.0 Provider: discovery, JWKS, ID tokens, UserInfo, consent, RP-initiated logout, dynamic client registration
  • SCIM 2.0 server: User and Group resources with filter parser
  • LDAP backend: read-mostly LDAP/Active Directory with bind-based password authentication
  • Sessions, groups, invitations, rate limiting, account lockout, audit logging, i18n
  • Framework adapters for Flask, Litestar, Starlette
  • Admin console (Litestar) with user management, bulk import/export, live audit log, security dashboard
  • Reference deployment: Dockerfile, docker-compose, starter Helm chart, neozen serve production-mode CLI

Design principles

  • Framework-agnostic: works with Flask, Litestar, Starlette, or any WSGI/ASGI app
  • Protocol-based: depend on interfaces, not implementations
  • Bring Your Own Model: factory functions and split protocols let you plug your own User model without inheriting from NeoZen base classes
  • Secure by default: Argon2id hashing, timing-safe comparison, rate limiting, account lockout, audit logging
  • Modular: use only the components you need
  • Type-checked across mypy, ty, and pyrefly

Documentation

Full docs at https://neozen.lab.abilian.com/ (or build locally with make -C docs serve).

Development

# Clone
git clone https://git.sr.ht/~sfermigier/neozen
cd neozen

# Install with all extras
uv sync --all-extras

# Run the full test suite
uv run pytest tests/a_unit tests/b_integration tests/c_e2e

# Lint
uv run ruff check

# Build the docs
make -C docs serve

License

Apache License 2.0. See LICENSE.

NeoZen is sponsored by Abilian SAS. Abilian's interest in NeoZen is in consulting and integration services around the OSS, not in a product upsell. There is no paid tier and no open-core gating.

Metadata

Release files for neozen 0.9.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for neozen 0.9.1
File Size Uploaded Provenance Actions
neozen-0.9.1.tar.gz 331.8 kB Without provenance Details for neozen-0.9.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for neozen 0.9.1
File Interpreter ABI Platform Actions
neozen-0.9.1-py3-none-any.whl Python 3 none any Details for neozen-0.9.1-py3-none-any.whl

Total release size: 789.5 kB

Release files / neozen-0.9.1.tar.gz

Download URL neozen-0.9.1.tar.gz
Size 331.8 kB
Tags Source
SHA-256 checksum
How to use checksums
69781c149a01771519585452ab6317bbc1b56872d15318081f6acaa82acfc947
BLAKE2b-256 checksum
How to use checksums
1927191a63fec5048ae75249fe470142738f9b8b70f89609e26f540fa07d7d4b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.4 {"installer":{"name":"uv","version":"0.13.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / neozen-0.9.1-py3-none-any.whl

Download URL neozen-0.9.1-py3-none-any.whl
Size 457.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f566d69b1d393396773a88357844a02e151b6822f4ad7296d33fd2b05603ed3d
BLAKE2b-256 checksum
How to use checksums
138d1e70182edc9378b5a015b355ac07db8ff54e6fed8af733108ae3427dcd3d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.4 {"installer":{"name":"uv","version":"0.13.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for neozen 0.9.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.9.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page