--- id: cedarpy version: "4.8.7" license: unclear license_treatment: unclear maintenance: active --- # cedarpy License: unclear · Maintenance: active · Downloads: 669.6K/mo ## What it is and what it does cedarpy is a Python wrapper around the Cedar Policy authorization engine, a Rust-based policy evaluator developed by AWS. It lets you define fine-grained access-control policies in Cedar's domain-specific language, then evaluate authorization requests against those policies and a schema from Python. The package supports three main workflows: checking whether a single request is authorized, validating policies against a schema, and formatting policies. The library is designed for performance in long-running services and serverless functions. It offers batch authorization (evaluating many requests against shared policies in one call, often 10x faster than individual calls), reusable PolicySet handles to avoid re-parsing static policies on every request, and optional per-request policy fragments layered on top of a static base. It has no runtime dependencies and is available as pre-built wheels for modern Python versions and common platforms. Use it for: - Enforce fine-grained access control in a web service by evaluating Cedar policies against incoming requests before granting access to resources. - Batch-authorize a set of user actions in a single call to avoid the overhead of parsing policies and entities repeatedly. - Validate a policy file against a schema at deployment time to catch syntax and type errors before policies go live. - Reuse a static policy set across many authorization requests in a long-running service or Lambda function, avoiding repeated parsing. - Add dynamic per-request policies to a static base policy set without re-parsing the entire base each time. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. cedarpy binds the Cedar Policy authorization engine to Python, letting you evaluate access-control policies and validate them against schemas from Python code. Yes, if you need Cedar's policy language and evaluation engine in Python. The package is actively maintained, has no known vulnerabilities, covers modern Python versions and common platforms with pre-built wheels, and offers both single-request and batch authorization with performance optimizations for static policies. License treatment is unclear, so verify licensing terms before use in commercial projects. ## Install pip install cedarpy uv add cedarpy poetry add cedarpy ## Installing cedarpy Before you install: Medium install friction due to platform-specific wheels (compiled Rust bindings), but pre-built wheels cover Linux x86_64/aarch64, macOS x86_64/arm64, and Windows x86_64 for Python 3.10–3.14. Active maintenance with a release 35 days ago. Quickstart: pip install cedarpy from cedarpy import is_authorized, Decision policies = "permit(principal, action, resource);" entities = [{"uid": {"__entity": {"type": "User", "id": "alice"}}, "attrs": {}, "parents": []}] request = {"principal": 'User::"alice"', "action": 'Action::"read"', "resource": 'Photo::"1"', "context": {}} result = is_authorized(request, policies, entities) if result.decision == Decision.Allow: print("Access granted") Requires Python 3.9 or later; pre-built wheels available for Linux, macOS, and Windows on common architectures. Verify before relying: - Whether the package is officially supported by AWS or the Cedar Policy team (description states it is not, but maintainer affiliation is unclear) - Exact performance characteristics of batch authorization relative to single-request calls in real-world scenarios ## Package facts - License: not declared (unclear) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 669.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags cedar policy authorization python, access control policy engine, authorization decision evaluation, policy validation schema, attribute-based access control, python policy engine, cedar rust bindings, authorization, access-control, policy-engine [View on SkillFed](https://skillfed.io/packages/cedarpy) · [View on PyPI](https://pypi.org/project/cedarpy/)