Python module to add username and password authentication to specific FastAPI routes
Project description
FastAPIAuthenticator
Python module to add username and password authentication to specific FastAPI routes
Platform Supported
Installation
repo="thevickypedia/FastAPIAuthenticator"
latest=$(curl -s https://api.github.com/repos/${repo}/tags | jq -r '.[0].name')
pip install "git+https://github.com/${repo}.git@${latest}"
Usage
import fastapiauthenticator
from fastapi import FastAPI
app = FastAPI()
@app.get("/public")
def public_route():
return {"message": "This is a public route"}
def private_route():
return {"message": "This is a private route"}
fastapiauthenticator.Authenticator(app=app, secure_function=private_route)
Coding Standards
Docstring format: Google
Styling conventions: PEP 8 and isort
Release Notes
Requirement
python -m pip install gitverse
Usage
gitverse-release reverse -f release_notes.rst -t 'Release Notes'
Linting
Requirement
python -m pip install sphinx==5.1.1 pre-commit recommonmark
Usage
pre-commit run --all-files
License & copyright
© Vignesh Rao
Licensed under the MIT License
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
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_ui_auth-0.0.1-py3-none-any.whl.
File metadata
- Download URL: fastapi_ui_auth-0.0.1-py3-none-any.whl
- Upload date:
- Size: 16.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a8fc9c91f7c2c5087254274a756d850fa2b74e7592b50ac40e7b131d1280bab
|
|
| MD5 |
d50ff56d058bea4ac378af58b344b19f
|
|
| BLAKE2b-256 |
1df732009d47b8b4b0c7c727ce3657c364c0ad0173212bab04fe465fe3d3d750
|