https://github.com/warrant-dev/warrant-python
Python SDK for Warrant
https://github.com/warrant-dev/warrant-python
abac access-control acl attribute-based-access-control authorization authz permissions python rbac role-based-access-control
Last synced: 6 months ago
JSON representation
Python SDK for Warrant
- Host: GitHub
- URL: https://github.com/warrant-dev/warrant-python
- Owner: warrant-dev
- License: mit
- Created: 2021-09-16T05:13:21.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-06-03T19:09:44.000Z (over 1 year ago)
- Last Synced: 2025-04-13T21:13:49.539Z (6 months ago)
- Topics: abac, access-control, acl, attribute-based-access-control, authorization, authz, permissions, python, rbac, role-based-access-control
- Language: Python
- Homepage:
- Size: 46.9 KB
- Stars: 9
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Warrant Python Library
Use [Warrant](https://warrant.dev/) in Python projects.
[](https://pypi.org/project/warrant-python/)
## Installation
```python
pip install warrant-python
```## Usage
```python
import warrantwarrant.api_key = "api_test_f5dsKVeYnVSLHGje44zAygqgqXiLJBICbFzCiAg1E="
warrant.User.create()
warrant.Tenant.create(id="dunder_mifflin")
```## Configuring the API Endpoint
---
The API endpoint the SDK makes requests to is configurable via the `warrant.api_endpoint` attribute:```python
import warrant# Set api endpoint to http://localhost:8000
warrant.api_endpoint = 'http://localhost:8000'
```We’ve used a random API key in these code examples. Replace it with your
[actual publishable API keys](https://app.warrant.dev) to
test this code through your own Warrant account.For more information on how to use the Warrant API, please refer to the
[Warrant API reference](https://docs.warrant.dev).Note that we may release new [minor and patch](https://semver.org/) versions of this library with small but backwards-incompatible fixes to the type declarations. These changes will not affect Warrant itself.
## Warrant Documentation
- [Warrant Docs](https://docs.warrant.dev/)