armasec-lite validates bearer tokens against your identity provider's JWKS, checks
scopes and issuer/audience claims, and guards a route with a single Depends(). It is a
dependency-minimal reimplementation of
armasec 3.x with the same public API,
built almost entirely on the standard library. Runtime dependencies are fastapi,
cryptography and pydantic.
Install
uv add armasec-lite
The pytest fixtures, including the mock OIDC provider, live behind an extra:
uv add "armasec-lite[test]"
Usage
"""Secure a single route against one OIDC domain."""
import os
from armasec_lite import Armasec
from fastapi import Depends, FastAPI
app = FastAPI()
armasec = Armasec(
domain=os.environ.get("ARMASEC_DOMAIN"),
audience=os.environ.get("ARMASEC_AUDIENCE"),
)
@app.get("/stuff", dependencies=[Depends(armasec.lockdown("read:stuff"))])
async def check_access():
return {"message": "Successfully authenticated!"}
Runnable variants, including multiple domains, match_keys, permission extractors and the
plugin system, are in examples/.
Documentation
docs.vantagecompute.ai/developer/armasec-lite
- Installation
- Quickstart
- Migrating from armasec covers every behavior difference from upstream 3.x, and what each one requires of you.
- Security covers the JWT verification order, the threat model, and what the attack suite defends.
- Architecture covers the request lifecycle, the caching model and the threading model.
- API Reference
License
MIT. See LICENSE.
Metadata
Release files for armasec-lite 0.1.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| armasec_lite-0.1.8.tar.gz | 108.6 kB | With provenance | Details for armasec_lite-0.1.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| armasec_lite-0.1.8-py3-none-any.whl | Python 3 | none | any | Details for armasec_lite-0.1.8-py3-none-any.whl |
Total release size: 188.4 kB
Release files / armasec_lite-0.1.8.tar.gz
| Download URL | armasec_lite-0.1.8.tar.gz |
|---|---|
| Size | 108.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
38bcbbcde17e5b4ac903f1a71ce8718ffd362901d3e00ca9b02c0964400109cc
|
|
BLAKE2b-256 checksum How to use checksums |
b2b51c52102f4f7edff55ddebbfc9b854b5a4f1841f70627580c6ad9c8921f9d
|
| 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 11, 2026.
Transparency logRelease files / armasec_lite-0.1.8-py3-none-any.whl
| Download URL | armasec_lite-0.1.8-py3-none-any.whl |
|---|---|
| Size | 79.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1f71cd2982cfce6047256e0b12835aa3d2375228b57faecc54e4d26b2846266b
|
|
BLAKE2b-256 checksum How to use checksums |
18810bb426bcd5eded5d650475f1e0e0f68d1677f3ca764519c2d4a299aaa8f3
|
| 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 11, 2026.
Transparency logSecurity for armasec-lite 0.1.8
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.
Attestation for armasec_lite-0.1.8.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 11, 2026.
Transparency logA 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.