-
Notifications
You must be signed in to change notification settings - Fork 88
[feature] Python bindings via PyO3 #418
Copy link
Copy link
Open
Description
Summary
Would there be interest in Python bindings for casbin-rs using PyO3?
Motivation
- The existing pure-Python pycasbin works well, but a Rust-backed binding would offer significantly better enforcement throughput for high-traffic services.
- PyO3 + maturin makes it straightforward to publish a
pip install-able wheel to PyPI. - Other Rust projects (e.g., pydantic-core, ruff, polars) have demonstrated this pattern successfully.
Rough Scope
- A PyO3 wrapper around the core
casbinAPI —Enforcer, model/policy loading,enforce(), RBAC role management. - Publish to PyPI with pre-built wheels for Linux / macOS / Windows via maturin + GitHub Actions.
Questions for the Community
- Is this something people would find useful?
- Should it live in this repo (as a workspace crate) or in a separate repo?
- Which subset of the API would be most valuable to expose first?
- Anyone interested in collaborating on this?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels