Skip to main content

Simple role-based authorization extension

Project description

RBAC Engine

A lightweight policy-based Role-Based Access Control (RBAC) engine for Python.

Installation

pip install rbac
from rbac import PolicyEngine

# Initialize the engine
engine = PolicyEngine()

# Add roles and permissions
engine.add_role("admin", ["*"])
engine.add_role("editor", ["read", "write"])

# Assign roles to users
engine.assign_role("user_123", "editor")

# Evaluate permissions
print(engine.evaluate("user_123", "write"))  # True
print(engine.evaluate("user_123", "delete")) # False

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

rbac_guard-0.1.0.tar.gz (1.8 kB view details)

Uploaded Source

Built Distribution

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

rbac_guard-0.1.0-py3-none-any.whl (2.2 kB view details)

Uploaded Python 3

File details

Details for the file rbac_guard-0.1.0.tar.gz.

File metadata

  • Download URL: rbac_guard-0.1.0.tar.gz
  • Upload date:
  • Size: 1.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for rbac_guard-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1b3123853258ac172d1ab1e4aebf5f7aab2176806b166b3d0f7ada4b9640eeaa
MD5 2eb4f986514c8719cb0526e11c52c541
BLAKE2b-256 1d6dec17729ca6751826e15c781549267936d1420045e06e438dad73a97de389

See more details on using hashes here.

File details

Details for the file rbac_guard-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: rbac_guard-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 2.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for rbac_guard-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 428192ddf4053edbcea34c24ebf5089d10750eb4711e68adec704864db7f778a
MD5 263dced0eb11ce859ebe02754f905149
BLAKE2b-256 1790dc664fbef75567b0bc0755b95b3db054d43cb5e529fd104f83eda3581046

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