Role-Based Access Control (RBAC) library for FastAPI applications, powered by Casbin.
Project description
fastapi-role (Core Library)
fastapi-role is a flexible, pluggable Role-Based Access Control library for FastAPI applications, powered by Casbin.
Features
- 🔒 Decorator-based Security: Secure endpoints with
@require. - 🛠️ Framework Agnostic: Works with any User model via Protocol.
- 🧩 Pluggable Architecture: Customize Policy Storage, Role Extraction, etc.
- 🔄 Sync & Async Support: Full SQLAlchemy support.
- 📦 Zero-Config Defaults: Works out of the box.
Installation
pip install fastapi-role
Documentation
Full documentation is available in the GitHub Repository.
Usage
See the Quick Start guide on the main repository.
License
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 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_role-0.1.0.dev1.tar.gz.
File metadata
- Download URL: fastapi_role-0.1.0.dev1.tar.gz
- Upload date:
- Size: 39.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d9458117197d547202ee96043fdcb11ebc2ddfe0f6980dd0b9231480705f254
|
|
| MD5 |
0f2259b1358408b7e3cfbb97111931b4
|
|
| BLAKE2b-256 |
f4affea681e4b70298f69f620be2add22cb625d097193d3c53b4f3369ad245e6
|
File details
Details for the file fastapi_role-0.1.0.dev1-py3-none-any.whl.
File metadata
- Download URL: fastapi_role-0.1.0.dev1-py3-none-any.whl
- Upload date:
- Size: 24.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
94d466f34fcfdc7417cc7dc6c01c5914ba6874c2e224dc4472ddfa5e62f30e22
|
|
| MD5 |
10d01b35d02240cc0b01889ebbf473af
|
|
| BLAKE2b-256 |
3eefef3f64a4e2b8a4fd496b6a3a01b9966ca5c9e55849f056d89eeb8727f08f
|