An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          

# Warrant Python Library

Use [Warrant](https://warrant.dev/) in Python projects.

[![PyPI](https://img.shields.io/pypi/v/warrant-python)](https://pypi.org/project/warrant-python/)

## Installation

```python
pip install warrant-python
```

## Usage

```python
import warrant

warrant.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/)