Skip to main content

Add your description here

Project description

FastAPIOAuthRBAC

PyPI version Downloads Downloads Month

A comprehensive FastAPI library for Authentication and NIST-style Role-Based Access Control (RBAC).


📖 Complete Documentation

The documentation has been significantly improved and split into easy-to-digest resources:


🛠️ Examples

Check out the examples/ directory for practical implementations:

  • basic_app.py: Standard implementation.
  • multi_tenancy.py: [NEW] Scoping users and roles to tenants.
  • advanced_extension.py: [NEW] Custom User models, Hooks, and Email services.
  • testing_example.py: [NEW] How to test your protected routes.

Quick Start (Minimal)

from fastapi import FastAPI
from fastapi_oauth_rbac import FastAPIOAuthRBAC

app = FastAPI()
auth = FastAPIOAuthRBAC(app)
auth.include_auth_router()
auth.include_dashboard()

📦 Installation Extras

# For PostgreSQL support
pip install "fastapi-oauth-rbac[postgres]"

# For SQLite support (async)
pip install "fastapi-oauth-rbac[sqlite]"

Features

  • Asynchronous: Full support for aiosqlite, asyncpg, etc.
  • NIST RBAC: Advanced Role-Based Access Control with hierarchy.
  • Full Auth Flow: Login, Signup, OAuth (Google), and Global Logout.
  • Premium Dashboard: Manage users and roles through a beautiful glassmorphism UI.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fastapi_oauth_rbac-0.1.1.tar.gz (28.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fastapi_oauth_rbac-0.1.1-py3-none-any.whl (40.9 kB view details)

Uploaded Python 3

File details

Details for the file fastapi_oauth_rbac-0.1.1.tar.gz.

File metadata

  • Download URL: fastapi_oauth_rbac-0.1.1.tar.gz
  • Upload date:
  • Size: 28.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.15 {"installer":{"name":"uv","version":"0.9.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for fastapi_oauth_rbac-0.1.1.tar.gz
Algorithm Hash digest
SHA256 12f2ff387959e6c3324d374517b4f47631b3cd7b80437cbdcd57bd73cfb6b1d3
MD5 778545fbe9fc68d7bc7aee199d321d46
BLAKE2b-256 0425153ca1e2a925dee20d312b418ac9464a6dd76b4c074995b7f1379449fae5

See more details on using hashes here.

File details

Details for the file fastapi_oauth_rbac-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: fastapi_oauth_rbac-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 40.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.15 {"installer":{"name":"uv","version":"0.9.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for fastapi_oauth_rbac-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 20d07f96bf236e9e1635a341f83917e5b899f0ef84cd20c25e334fd397e53224
MD5 b531e9fcc6de34de3b16d1229ebfcd74
BLAKE2b-256 65b6e9dff6f01427c4da9c0d5a26e7d2f52c02ecd020f2805fc8a78c1dede52f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page