Skip to content

Latest commit

 

History

History
51 lines (33 loc) · 1.7 KB

File metadata and controls

51 lines (33 loc) · 1.7 KB

pystapi-client

CI

Documentation

A Python client for working with STAPI APIs.

Installation

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

Development

See the instructions in the pystapi monorepo.

Documentation

See the documentation page for the latest docs.

Usage Example

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")