strig-auth
[!WARNING]
Experimental: this binding has no semver guarantee yet and can change in a minor version. See what 1.0 guarantees.
Python binding for Strig: the same engine and the same JSON
EngineSpec as the Rust and JavaScript APIs, as a native extension (PyO3, abi3, Python 3.9+).
import strig
engine = strig.Engine(spec)
ctx = strig.Context(grants, now=1_700_000_000_000)
engine.check(ctx, {"subject": {"type": "user", "id": "u1"}, "permission": "doc.read",
"resource": {"type": "doc", "id": "d1"}})
See the repository README, section Python.