fastapi-authz-lite: plug-and-play authentication for FastAPI (JWT, password hashing, dependencies).
Project description
fastapi-auth-kit
fastapi-auth-kit provides plug-and-play authentication for FastAPI.
Features (v0.1.0)
- JWT access token creation + verification
- Password hashing (bcrypt)
- FastAPI dependency:
require_user()
Refresh tokens + OAuth planned for v0.2+.
Install
pip install fastapi-auth-kit
Quick example
from fastapi import FastAPI, Depends
from fastapi_auth_kit import AuthKit, AuthConfig
app = FastAPI()
auth = AuthKit(AuthConfig(secret_key="supersecret"))
@app.post("/login")
def login(username: str):
token = auth.create_access_token({"sub": username})
return {"access_token": token}
@app.get("/me")
def me(user=Depends(auth.require_user())):
return user
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fastapi_authz_lite-0.1.0.tar.gz.
File metadata
- Download URL: fastapi_authz_lite-0.1.0.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae993cffcfefea720a86107d0ef0cd337d71f523b27779d9052c1d082be47942
|
|
| MD5 |
c41245f25f63d2d11fc3337f722dac81
|
|
| BLAKE2b-256 |
9a531169ca35d2d3a62a02f12cfdc952eaddc99ea59290f91692231eedee667b
|
Provenance
The following attestation bundles were made for fastapi_authz_lite-0.1.0.tar.gz:
Publisher:
publish.yml on Kubenew/fastapi-auth-kit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fastapi_authz_lite-0.1.0.tar.gz -
Subject digest:
ae993cffcfefea720a86107d0ef0cd337d71f523b27779d9052c1d082be47942 - Sigstore transparency entry: 1357562379
- Sigstore integration time:
-
Permalink:
Kubenew/fastapi-auth-kit@f6180536fbb75ab343420c509577f9e20e620043 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Kubenew
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f6180536fbb75ab343420c509577f9e20e620043 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file fastapi_authz_lite-0.1.0-py3-none-any.whl.
File metadata
- Download URL: fastapi_authz_lite-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a86b746b811866c1ed39a30017be1f0354e4101071b167b16e7ba85345618071
|
|
| MD5 |
2b59490ded8be01b931cb8a6404f00f1
|
|
| BLAKE2b-256 |
3041738ff6e6934c1ebac601654b4f9da4880705a2cb0ba9f598875cb312888f
|
Provenance
The following attestation bundles were made for fastapi_authz_lite-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on Kubenew/fastapi-auth-kit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fastapi_authz_lite-0.1.0-py3-none-any.whl -
Subject digest:
a86b746b811866c1ed39a30017be1f0354e4101071b167b16e7ba85345618071 - Sigstore transparency entry: 1357562462
- Sigstore integration time:
-
Permalink:
Kubenew/fastapi-auth-kit@f6180536fbb75ab343420c509577f9e20e620043 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Kubenew
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f6180536fbb75ab343420c509577f9e20e620043 -
Trigger Event:
workflow_dispatch
-
Statement type: