Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

FastAPIAuthenticator

Python module to add username and password authentication to specific FastAPI routes

Python

Platform Supported

Platform

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 as api

from fastapi import FastAPI

app = FastAPI()

@app.get("/public")
async def public_route():
    return {"message": "This is a public route"}

async def private_route():
    return {"message": "This is a private route"}

api.protect(
    app=app,
    params=api.Parameters(
        path="/private",
        function=private_route
    )
)

FastAPIAuthenticator supports both APIRoute and APIWebSocketRoute routes.
Refer samples directory for different use-cases.

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

© Vignesh Rao

Licensed under the MIT License

Metadata

Release files for FastAPI-UI-Auth 0.0.1a0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for FastAPI-UI-Auth 0.0.1a0
File Interpreter ABI Platform Actions
fastapi_ui_auth-0.0.1a0-py3-none-any.whl Python 3 none any Details for fastapi_ui_auth-0.0.1a0-py3-none-any.whl

Release files / fastapi_ui_auth-0.0.1a0-py3-none-any.whl

Download URL fastapi_ui_auth-0.0.1a0-py3-none-any.whl
Size 16.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6929a1d5c9f6496e402367b12d289fb2999be0aa8104d7d95ab54916569433cc
BLAKE2b-256 checksum
How to use checksums
9c91965425f0491209145e1d677baccf0d5f20c103be24cf54560d2af5265bd6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.5

Security for FastAPI-UI-Auth 0.0.1a0

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page