Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

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