Metadata-Version: 2.4
Name: strig-auth
Version: 0.10.0
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Operating System :: OS Independent
Classifier: Typing :: Typed
Requires-Dist: pytest>=8 ; extra == 'test'
Provides-Extra: test
Summary: Strig authorization engine for Python: the same engine and the same JSON spec as the Rust and JavaScript APIs.
Keywords: authorization,permissions,rbac,rebac,policy
Home-Page: https://github.com/The-Hades-Organization/Strig
Author: Hadson Ramalho
License: MIT
Requires-Python: >=3.9
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Homepage, https://github.com/The-Hades-Organization/Strig
Project-URL: Repository, https://github.com/The-Hades-Organization/Strig

# strig-auth

Python binding for [Strig](https://github.com/The-Hades-Organization/Strig): the same engine and the same JSON
`EngineSpec` as the Rust and JavaScript APIs, as a native extension (PyO3, `abi3`, Python 3.9+).

```python
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.

