saastore-fastapi
FastAPI dependency that authenticates incoming requests via HMAC-signed identity headers issued by the saastore edge proxy.
Install
pip install saastore-fastapi
Use
from fastapi import Depends, FastAPI
from saastore_fastapi import SaastoreUser, saastore_user
app = FastAPI()
@app.get("/dashboard")
def dashboard(user: SaastoreUser = Depends(saastore_user)):
return {"email": user.email, "plan": user.plan}
Environment
| Variable | Required | Description |
|---|---|---|
SAASTORE_HMAC_SECRET |
Yes | Provided by saastore at container provision time. 64-character hex string. |
What this rejects
- Missing identity headers — 401
- Bad signature — 401
- Timestamp more than 5 minutes off the container's clock — 401 (configurable freshness window in
verify.py) SAASTORE_HMAC_SECRETenv var unset — 500 (config error, not auth)
Wire format
See docs/superpowers/specs/2026-05-22-hosted-apps-poc-design.md section 5 in the saastore monorepo. The canonical signature string is user_id|email|plan|timestamp, signed with HMAC-SHA256 and hex-encoded.
Development
From the monorepo root:
cd sdks/saastore-fastapi
uv run --with fastapi --with httpx --with pytest pytest -v
License
MIT
Metadata
Release files for saastore-fastapi 0.1.0
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 |
|---|---|---|---|---|
| saastore_fastapi-0.1.0.tar.gz | 25.8 kB | Without provenance | Details for saastore_fastapi-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| saastore_fastapi-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for saastore_fastapi-0.1.0-py3-none-any.whl |
Total release size: 30.3 kB
Release files / saastore_fastapi-0.1.0.tar.gz
| Download URL | saastore_fastapi-0.1.0.tar.gz |
|---|---|
| Size | 25.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7df91c57dc6e809a30fb7b67aa1a92b1e6d230caa8e8a793700f9de585bfbfcc
|
|
BLAKE2b-256 checksum How to use checksums |
5f216e57b85ab8d558cfc78696b95d09752197baf6129a07ccf2646673903f8f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.11
|
Release files / saastore_fastapi-0.1.0-py3-none-any.whl
| Download URL | saastore_fastapi-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1c16335cfafb5538e5e7bd03416bf16fd4136b1ca7f2466f894d174882485511
|
|
BLAKE2b-256 checksum How to use checksums |
b12acdff08f88592a9be4e34acafad606fb6161ebb43cd0fd5ef704d26f89d41
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.11
|
Security for saastore-fastapi 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.
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.