Skip to main content

Python SDK for adding Stanza Systems fault tolerance to your python 3 service.

Project description

Stanza Python SDK

Stanza is a developer-first tool for increasing reliability based on prioritized traffic management, quota allocation, and rate-limiting. On the back-end, it helps prevent downtime related to overload and excessive use of third-party APIs. On the front-end, it helps segment and weight your traffic, react automatically to overload or other conditions, and inspect the state of your critical user journeys.

"Stanza Python SDK" provides higher-order functions ("guards") for adding this fault tolerance to your python 3.9+ application.

Installation

The SDK is available on the Python Package Index (PyPI). You can install them via pip with the following command:

pip install getstanza

Configuration

To use sdk-python, you'll need to import the getstanza package and initialize it with a Stanza API Key and other options.

If not specified in the SDK initialization, the API Key, Service Name, Service Release, and Environment are read from the environment variables STANZA_API_KEY, STANZA_SERVICE_NAME, STANZA_SERVICE_RELEASE, and STANZA_ENVIRONMENT, respectively.

For more information, see the Initialize Stanza section of our Python SDK documentation.

Usage

The SDK supports weighted, prioritized, global rate limiting which is externally managed by the Stanza Dashboard.

The samples/fastapi directory is a good place to start! (It's an example application which shows how to wrap inbound and outbound HTTP traffic with Stanza Guards.)

Or browse the Official Stanza Documentation for more info on how to get started.

Community

Join Stanza's Community Discord to get involved and help us improve the SDK!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

getstanza-0.0.3b1.tar.gz (46.0 kB view details)

Uploaded Source

Built Distribution

getstanza-0.0.3b1-py3-none-any.whl (71.2 kB view details)

Uploaded Python 3

File details

Details for the file getstanza-0.0.3b1.tar.gz.

File metadata

  • Download URL: getstanza-0.0.3b1.tar.gz
  • Upload date:
  • Size: 46.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.10.12 Linux/5.15.146.1-microsoft-standard-WSL2

File hashes

Hashes for getstanza-0.0.3b1.tar.gz
Algorithm Hash digest
SHA256 4082a782a32f47b542f4e00310c572d3e84a14903a3aa44abf08e8a6ad4c5bf3
MD5 5e406471771491283e6cdaeb4eed92e1
BLAKE2b-256 849e0de5371338ed45b3ea70a9729a3dcabcb10896af47ab10a143b2cf184b08

See more details on using hashes here.

File details

Details for the file getstanza-0.0.3b1-py3-none-any.whl.

File metadata

  • Download URL: getstanza-0.0.3b1-py3-none-any.whl
  • Upload date:
  • Size: 71.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.10.12 Linux/5.15.146.1-microsoft-standard-WSL2

File hashes

Hashes for getstanza-0.0.3b1-py3-none-any.whl
Algorithm Hash digest
SHA256 d839a6d1d077d548bf5e91e79afa2429de0ce3b1d4c40fa8d39829639ff9d36c
MD5 544b93d0aece16cf7a7b427e251d5e27
BLAKE2b-256 41069fe2b00851347f69e3add054b6a597e91ca2637deffbb85243a3cb8dc0ee

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page