{"categories":[{"label":"Database","url":"https://skillfed.io/packages/category/database/2"}],"enrichment":{"capability":"Bridges PyCasbin access-control policies with SQLAlchemy-supported databases, enabling policy persistence and retrieval across PostgreSQL, MySQL, SQLite, Oracle, SQL Server, Firebird, and Sybase.","skillfed_tags":["access-control","policy-persistence","rbac"],"use_cases":["Store and load RBAC policies for a multi-tenant application across application restarts.","Manage ACL rules in a centralized database so multiple service instances enforce the same permissions.","Persist dynamic policy changes made at runtime without redeploying or restarting the application.","Migrate access-control policies between different database backends using SQLAlchemy's dialect abstraction.","Integrate pycasbin policy enforcement into an existing application that already uses SQLAlchemy for data access."],"what_it_does":"This package acts as a bridge between pycasbin (a policy enforcement library) and any database that SQLAlchemy supports. Instead of storing access-control policies in memory or flat files, you point it at a database connection string, and it handles loading and saving policy rules to a database table. The adapter automatically creates the necessary schema on first use (unless you disable it), and works transparently with pycasbin's Enforcer to persist role-based access control (RBAC), attribute-based access control (ABAC), and access control list (ACL) policies.\n\nTypical usage involves creating an Adapter with a database URL, passing it to a pycasbin Enforcer along with a policy model file, and then using the Enforcer to check permissions. The adapter manages the database interaction; you focus on policy rules and enforcement logic. It supports custom table names and can be configured to skip automatic table creation if your schema is managed separately.","worth_installing":"Yes, if you need to persist pycasbin policies in a relational database. The package is actively maintained, has no known vulnerabilities, and low install friction. It is a straightforward adapter with a narrow, well-defined scope\u2014use it when pycasbin and SQLAlchemy are your architecture; do not install it if you are not already using pycasbin."},"id":"sqlalchemy-adapter","links":{"html":"https://skillfed.io/packages/sqlalchemy-adapter","md":"https://skillfed.io/packages/sqlalchemy-adapter.md","pypi":"https://pypi.org/project/sqlalchemy-adapter/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2025-11-17","license_spdx":null,"license_treatment":"permissive","name":"sqlalchemy-adapter","python_support":"supports_current","summary":"SQLAlchemy Adapter for PyCasbin"},"popularity":{"monthly_downloads":1782012,"position":3567,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"1.9.0"}
