Skip to main content

AuthMate

AuthMate is a provider-neutral authorization boundary for Python services. Version 0.1.0 is a stateless contract preview: it validates shared values, coordinates principal and authorization providers, and supplies a small FastAPI adapter. It does not authenticate requests, persist data, implement RBAC, manage credentials, or provide a production-readiness guarantee.

Independent by default, composable by contract.

Status

The phase 0.1 runtime is implemented under src/authmate. Read the quickstart and planning index for the public contract and release boundary.

Supported runtime

Python 3.11 through 3.14. Install this checkout with uv sync --group dev. AuthMate is distributed under the MIT License.

Quick start

Providers are host-owned and implement the protocols in authmate.protocols. The service calls the principal provider first, then the authorization provider only for an enabled, non-expired principal.

from uuid import uuid4
from authmate import (
    AccessContext,
    AuthMate,
    AuthorizationDecision,
    PrincipalKind,
    PrincipalRecord,
    PrincipalRef,
)

actor = PrincipalRef(id=uuid4(), kind=PrincipalKind.USER)


class Principals:
    async def get_principal(self, ref):
        return PrincipalRecord(ref=ref, display_name="Ada", enabled=True)

    async def aclose(self):
        pass


class Policy:
    async def authorize(self, *, principal, action, resource):
        return AuthorizationDecision(
            allowed=True, reason="allowed", action=action, resource=resource
        )

    async def aclose(self):
        pass


async def check_request():
    service = AuthMate(principal_provider=Principals(), authorization_provider=Policy())
    try:
        return await service.require(context=AccessContext(actor=actor), action="report.read")
    finally:
        await service.aclose()

See the phase 0.1 quickstart for FastAPI integration, provider contracts, lifecycle behavior, and deliberate non-goals.

Development

uv sync --frozen --group dev
uv run ruff format --check .
uv run ruff check .
uv run mypy --strict src/authmate tests
uv run pytest --cov=authmate --cov-branch --cov-fail-under=95
uv build
uv run twine check dist/*

Planned MVP

  • Users, operator provisioning, opaque SQL-backed browser sessions, and revocation.
  • Service accounts, revocable API tokens, and generic delegated identity.
  • Exact RBAC scopes, FastAPI dependencies, and Python service APIs.
  • Credential metadata, exact secret-use grants, and approved environment references.
  • Durable SQL audit, rate limiting, CSRF protection, and explicit recovery procedures.
  • Typed public contracts, controlled model/provider extensions, and reviewed migrations.

PostgreSQL is the production reference; SQLite supports local development. No Redis, broker, external identity service, or external secret manager is required. Encrypted SQL secret storage, federation, tenancy, and richer extensions have later release gates.

Architecture principles

  • AuthMate owns its security semantics and public contracts; consumers adapt to them.
  • Mandatory service checks remain authoritative with custom providers.
  • Pydantic public contracts are separate from SQLModel/SQLAlchemy persistence.
  • FastAPI composition uses explicit DI, lifespan, security, and OpenAPI integration.
  • Core requires SQL-backed state, not process-local caches or additional services.

Hedron, ShuETL, and other applications may build optional adapters against AuthMate. Core contains no consumer workflow records, callbacks, domain imports, or release dependencies. Consumer-owned compatibility tests establish supported combinations. See Consumer Contracts and MVP gates.

Metadata

Release files for authmate 0.1.0

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

Source distribution (sdist)

Source distribution for authmate 0.1.0
File Size Uploaded Provenance Actions
authmate-0.1.0.tar.gz 142.3 kB With provenance Details for authmate-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 154.8 kB

Release files / authmate-0.1.0.tar.gz

Download URL authmate-0.1.0.tar.gz
Size 142.3 kB
Tags Source
SHA-256 checksum
How to use checksums
aef81892483343fa2d47943433c28f59cac03bbf37b051a7d21944f0b09b4149
BLAKE2b-256 checksum
How to use checksums
cc932d02cc85b58da47d0f6f00d1b48ecb08a570d7678ff9e7ea5d3f9cf33fd6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 12, 2026.

Transparency log

Release files / authmate-0.1.0-py3-none-any.whl

Download URL authmate-0.1.0-py3-none-any.whl
Size 12.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b5f92b49f9cbeb563ce0119d854dda01a71ceba229c30a9c172a482fecdfefbc
BLAKE2b-256 checksum
How to use checksums
81b46bc44e6466ba8c404a7d0d933fc646ee355e1e86aaa0cd57842c290e192d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 12, 2026.

Transparency log

Security for authmate 0.1.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for authmate-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 12, 2026.

Transparency log

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.1.0 This release

2 release files Full 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