rbac2fast-core
🚀 Core abstract package for Role-Based Access Control (RBAC) in Python/FastAPI. Contains Protocols and Pydantic schemas without database logic.
📖 Conventions reference: this package follows the 2fast-handbook for ecosystem conventions (structure, versioning, README, commits, release).
[!WARNING] Internal Use Notice
This package is designed and maintained by the Solautyc Team for internal use. While it is publicly available, it may not work as expected in all environments or use cases outside of our specific infrastructure. We do not provide support or guarantees for external usage, and we are not responsible for any issues that may arise from using this package in other contexts.
Use at your own risk. Contributions and feedback are welcome, but compatibility with external environments is not guaranteed.
Features
- 🧩 Abstract Interfaces: Defines standard
Protocolsfor RBAC models and services. - 📦 Pydantic Schemas: Pre-defined base models for validation and serialization of Roles, Permissions, Routes, and Assignments.
- 🪶 Lightweight: Zero database dependencies; relies solely on standard Python abstractions and
pydantic. - 🔌 Pluggable Architecture: Allows multiple concrete implementations (e.g., standard global RBAC or multi-tenant RBAC) to share a standardized API contract.
Installation
pip install rbac2fast-core
Structure
This package exposes abstract definitions that concrete implementations (like permissions2fast-fastapi) will fulfill.
Protocols (rbac2fast_core.protocols)
Defines minimal structural requirements that underlying models must fulfill:
RoleProtocol,PermissionProtocol,RouteProtocol...
Schemas (rbac2fast_core.schemas)
Provides validation schemas:
RoleBase,RoleCreate,RoleReadPermissionBase,PermissionCreate...
Usage
This package is not meant to be used standalone to handle permissions, but rather to be imported as a dependency by actual implementation packages or application layers that need to adhere to the standard RBAC design.
Example of implementing a protocol in your ORM model:
from sqlmodel import SQLModel, Field
from rbac2fast_core.protocols.models import RoleProtocol
class Role(SQLModel, table=True):
# This class structurally fulfills RoleProtocol
id: int | None = Field(default=None, primary_key=True)
name: str = Field(unique=True, index=True)
description: str | None = None
is_active: bool = True
License
This project is licensed under the MIT License - see the LICENSE file for details.
Copyright (c) 2026 Angel Daniel Sanchez Castillo
Metadata
Release files for rbac2fast-core 0.1.1
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 |
|---|---|---|---|---|
| rbac2fast_core-0.1.1.tar.gz | 8.1 kB | Without provenance | Details for rbac2fast_core-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rbac2fast_core-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for rbac2fast_core-0.1.1-py3-none-any.whl |
Total release size: 16.4 kB
Release files / rbac2fast_core-0.1.1.tar.gz
| Download URL | rbac2fast_core-0.1.1.tar.gz |
|---|---|
| Size | 8.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0c3ab4af724ab8bc2980d83d982ef3c7d44102b8ef6954b8ddf4d9a80b43ff7c
|
|
BLAKE2b-256 checksum How to use checksums |
37c36a121ab50cc9b8cfc65738851c58f57627a636bafcff0020716867900c4f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.9
|
Release files / rbac2fast_core-0.1.1-py3-none-any.whl
| Download URL | rbac2fast_core-0.1.1-py3-none-any.whl |
|---|---|
| Size | 8.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b9b7df25dba980e2c96309c6f5e3ef13ce7050b18d0f7fc92d1aa370a455a3c2
|
|
BLAKE2b-256 checksum How to use checksums |
8649fb81d1a504688dfc0d7101182b58dbe81d7cdc10cf2ca8d040bb3a302c65
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.9
|
Security for rbac2fast-core 0.1.1
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.