{"categories":[{"label":"Security","url":"https://skillfed.io/packages/category/security"}],"enrichment":{"capability":"PyCasbin enforces access control policies using models like ACL, RBAC, and ABAC, determining whether a subject can perform an action on an object based on configurable rules.","skillfed_tags":["authorization","access-control","policy-engine"],"use_cases":["Enforce role-based permissions in a web application where users have different roles with different capabilities per resource.","Implement multi-tenant authorization where the same user has different roles and permissions in different domains or tenants.","Build RESTful API access control matching HTTP methods and resource paths to user roles and permissions.","Manage hierarchical role structures where roles inherit permissions from parent roles, reducing policy duplication.","Enforce attribute-based rules where access depends on resource properties or request context.","Centralize authorization logic separate from business code so policies can be updated without redeployment."],"what_it_does":"PyCasbin is an access control library that evaluates authorization decisions by matching requests against configurable policies. It abstracts access control into a CONF file following the PERM metamodel (Policy, Effect, Request, Matchers), allowing you to define and enforce rules without changing code. The library supports multiple models\u2014ACL (basic subject-object-action rules), RBAC (role hierarchies and domain/tenant separation), ABAC (attribute-based matching), and RESTful patterns\u2014making it adaptable to different authorization schemes.\n\nYou provide a model configuration that defines how requests are matched against policies, then load or manage policies at runtime. PyCasbin handles the matching logic, role management, and policy persistence, but does not authenticate users or manage the user/role registry itself\u2014those remain your application's responsibility. It supports both synchronous and asynchronous enforcement, built-in operators for pattern matching, and deny-override semantics where explicit denials take precedence.","worth_installing":"Yes. PyCasbin is actively maintained, has low install friction, carries no known vulnerabilities, and is licensed permissively. It is well-suited for projects needing flexible, model-driven access control. Install it if your application requires authorization beyond simple role checks or if you anticipate changing authorization rules frequently."},"id":"pycasbin","links":{"html":"https://skillfed.io/packages/pycasbin","md":"https://skillfed.io/packages/pycasbin.md","pypi":"https://pypi.org/project/pycasbin/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-02-02","license_spdx":null,"license_treatment":"permissive","name":"pycasbin","python_support":"supports_current","summary":"An authorization library that supports access control models like ACL, RBAC, ABAC in Python"},"popularity":{"monthly_downloads":2075516,"position":3315,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"2.8.0"}
