Python client for Augur API microservices
Project description
simpleapps-com-augur-api
Python client library for Augur microservices.
Installation
pip install simpleapps-com-augur-api
Quick Start
from augur_api import AugurAPI
api = AugurAPI(
token="your-bearer-token",
site_id="your-site-id",
)
# Access any service via api.{service_name}
items = api.items.inv_mast.list(limit=10)
customers = api.customers.customer.list(limit=10)
orders = api.orders.oe_hdr.lookup()
Service Access Pattern
All services are accessed through the unified AugurAPI client:
api.items # Items service
api.customers # Customers service
api.orders # Orders service
api.pricing # Pricing service
api.commerce # Commerce service
# ... 27 services total
Documentation
| Resource | URL |
|---|---|
| Full API Reference | https://augur-api.info |
| Endpoint Hints | https://{service}.augur-api.com/llms.txt |
| Parameters | https://{service}.augur-api.com/endpoints.jsonl |
| OpenAPI Spec | https://{service}.augur-api.com/openapi.json |
Example: Items Service
- https://items.augur-api.com/llms.txt
- https://items.augur-api.com/endpoints.jsonl
- https://items.augur-api.com/openapi.json
Each llms.txt lists all other available services for discovery.
Authentication
All endpoints require:
site_id- Site identifiertoken- Bearer authentication token
api = AugurAPI(
site_id="your-site-id",
token="your-bearer-token",
)
Configuration
from augur_api import AugurAPI, AugurAPIConfig
# With custom configuration
config = AugurAPIConfig(
token="your-bearer-token",
site_id="your-site-id",
timeout=30.0,
retries=3,
retry_delay=1.0,
)
api = AugurAPI.from_config(config)
# From context (for framework integration)
api = AugurAPI.from_context(context)
Edge Caching
Enable Cloudflare edge caching on any GET request using the edge_cache parameter:
# Sub-hour caching
items = api.items.inv_mast.list(limit=10, edge_cache="30s") # 30 seconds
items = api.items.inv_mast.list(limit=10, edge_cache="1m") # 1 minute
items = api.items.inv_mast.list(limit=10, edge_cache="5m") # 5 minutes
# Hourly caching (1, 2, 3, 4, 5, or 8 hours)
items = api.items.inv_mast.list(limit=10, edge_cache=1) # 1 hour
items = api.items.inv_mast.list(limit=10, edge_cache=8) # 8 hours
| Value | Duration |
|---|---|
"30s" |
30 seconds |
"1m" |
1 minute |
"5m" |
5 minutes |
1 - 5, 8 |
1-5 or 8 hours |
The client automatically transforms edge_cache to Cloudflare's cacheSiteId{N} format.
Error Handling
from augur_api import AugurAPI
from augur_api.core.errors import (
AugurError,
AuthenticationError,
NotFoundError,
RateLimitError,
ValidationError,
)
api = AugurAPI(token="...", site_id="...")
try:
response = api.items.inv_mast.get(12345)
except NotFoundError as e:
print(f"Item not found: {e.message}")
except AuthenticationError as e:
print(f"Auth failed: {e.message}")
except RateLimitError as e:
print(f"Rate limited: {e.message}")
except AugurError as e:
print(f"API error: {e.code} - {e.message}")
For AI Agents
See SKILL.md for guidance on using this package with AI assistance.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file simpleapps_com_augur_api-2026.3.5.tar.gz.
File metadata
- Download URL: simpleapps_com_augur_api-2026.3.5.tar.gz
- Upload date:
- Size: 183.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b82bc59e22cae804f188541ef1ced58073ad043bc9d8f9a6f338a8a6694abb1
|
|
| MD5 |
8ab2fadb7df0255c01cbc2be22b8f47a
|
|
| BLAKE2b-256 |
ca8ee882a5ac3dc5ca12acc14c711aecfc183319f3fe8a0da6d12349570eed6f
|
File details
Details for the file simpleapps_com_augur_api-2026.3.5-py3-none-any.whl.
File metadata
- Download URL: simpleapps_com_augur_api-2026.3.5-py3-none-any.whl
- Upload date:
- Size: 152.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70091b02618311877bba2717fed8b7746c7ad8a332e973f19244505627cd57af
|
|
| MD5 |
15f869bd3e0dff8768c3954ce73185cb
|
|
| BLAKE2b-256 |
477a63222eb8b61601eee0e68b7efe4838af8d2e6ebf82031d51e1c04d0a53e6
|