FastAPI Simple Bearer (FSB)
This library provides you with ability to secure your endpoints with preset token (or tokens) in the "Authorization: Bearer" header
Installation
The easiest way to start working with this library is to install it from pip
pip install fastapi-simple-bearer
Example of usage
Basic usage:
from fastapi import Depends, FastAPI
from fastapi_simple_bearer import FSB, FSBToken
app = FastAPI()
fsb = FSB(token="SUPER_SECRET_TOKEN")
@app.get("/secure")
async def secure(auth: FSBToken = Depends(fsb)):
return {"token": auth.token}
Other examples are available in examples folder
Metadata
Release files for fastapi-simple-bearer 0.1.2
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 |
|---|---|---|---|---|
| fastapi_simple_bearer-0.1.2.tar.gz | 2.4 kB | Without provenance | Details for fastapi_simple_bearer-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fastapi_simple_bearer-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for fastapi_simple_bearer-0.1.2-py3-none-any.whl |
Total release size: 5.6 kB
Release files / fastapi_simple_bearer-0.1.2.tar.gz
| Download URL | fastapi_simple_bearer-0.1.2.tar.gz |
|---|---|
| Size | 2.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
766f199e0656854cb0c4d14df4fa328afaa06e7d13afd25b96723954f29fb9e2
|
|
BLAKE2b-256 checksum How to use checksums |
1819b96e44343cf8e785e9acb87c00ca5a890c39cc95a97d48c25ec9fb64171c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.1 CPython/3.12.6
|
Release files / fastapi_simple_bearer-0.1.2-py3-none-any.whl
| Download URL | fastapi_simple_bearer-0.1.2-py3-none-any.whl |
|---|---|
| Size | 3.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e4a28ea1bf8435fd306003e6c43d3100d60a39ea3abc4eabb8a617e34246337a
|
|
BLAKE2b-256 checksum How to use checksums |
39e2d0b8ee2c89b06b445579717fcb97993c375c68b53c9a78256abb30fb6cfe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.1 CPython/3.12.6
|
Security for fastapi-simple-bearer 0.1.2
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.