{"categories":[{"label":"Security","url":"https://skillfed.io/packages/category/security"}],"enrichment":{"capability":"Casbin enforces access control policies (ACL, RBAC, ABAC) by evaluating requests against a configurable model and policy rules, returning allow or deny decisions.","skillfed_tags":["authorization","access-control","policy-engine"],"use_cases":["Enforce role-based permissions in a web application where users have different roles (admin, editor, viewer) with different resource access levels.","Implement fine-grained ACL for a REST API, controlling which users can perform which HTTP methods on which resource paths.","Add attribute-based access control to a multi-tenant SaaS platform, where access decisions depend on resource ownership or other dynamic attributes.","Manage hierarchical role structures in an enterprise system where roles inherit permissions from parent roles.","Centralize authorization logic for microservices by using Casbin as a shared policy engine across multiple services."],"what_it_does":"Casbin is an access control library that enforces authorization decisions based on pluggable models (ACL, RBAC, ABAC, RESTful) and policy rules. It evaluates requests in the form of subject-object-action tuples against a configuration-driven policy engine, returning allow or deny decisions. The library does not handle authentication or user management\u2014it assumes those are handled elsewhere\u2014but it manages role hierarchies, policy storage, and rule matching with built-in operators.\n\nYou define your access control model in a CONF file using the PERM metamodel (Policy, Effect, Request, Matchers), then load policies from a CSV file or database. For each access attempt, you call enforce() with the relevant parameters, and Casbin evaluates the request against your policies and returns a boolean. It supports both allow and deny rules, role inheritance, domain/tenant isolation, and attribute-based matching.","worth_installing":"Yes. Casbin is actively maintained, has no known vulnerabilities, installs with minimal friction, and is widely adopted (top 5000 on PyPI). It solves a real problem\u2014decoupling authorization logic from application code\u2014and supports multiple access control models. Install it if you need flexible, model-driven authorization; skip it if your access control is trivial or if you prefer inline permission checks."},"id":"casbin","links":{"html":"https://skillfed.io/packages/casbin","md":"https://skillfed.io/packages/casbin.md","pypi":"https://pypi.org/project/casbin/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2025-05-10","license_spdx":null,"license_treatment":"permissive","name":"casbin","python_support":"supports_current","summary":"An authorization library that supports access control models like ACL, RBAC, ABAC in Python"},"popularity":{"monthly_downloads":2843231,"position":2865,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"1.43.0"}
