A Python client for working with STAPI APIs.
Install from PyPi. Other than stapi-pydantic itself, the only dependencies for pystapi-client are the Python httpx and python-dateutil libraries.
python -m pip install pystapi-clientSee the instructions in the pystapi monorepo.
See the documentation page for the latest docs.
The pystapi_client.Client class is the main interface for working with services that conform to the STAPI API spec.
from pystapi_client import Client
# Initialize client
client = Client.open("https://api.example.com/stapi")
# List all products
products = list(client.get_products())
# Get specific product
product = client.get_product("test-spotlight")
# List all Opportunities for a Product
opportunities = client.get_product_opportunities("test-spotlight")
# List orders
orders = client.get_orders()
# Get specific order
order = client.get_order("test-order")