Home

Awesome

Warrant Python Library

Use Warrant in Python projects.

PyPI

Installation

pip install warrant-python

Usage

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:

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

Note that we may release new minor and patch versions of this library with small but backwards-incompatible fixes to the type declarations. These changes will not affect Warrant itself.

Warrant Documentation