Skip to main content

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

Each llms.txt lists all other available services for discovery.

Authentication

All endpoints require:

  • site_id - Site identifier
  • token - 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


Download files

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

Source Distribution

simpleapps_com_augur_api-2026.5.4.tar.gz (160.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

simpleapps_com_augur_api-2026.5.4-py3-none-any.whl (96.3 kB view details)

Uploaded Python 3

File details

Details for the file simpleapps_com_augur_api-2026.5.4.tar.gz.

File metadata

  • Download URL: simpleapps_com_augur_api-2026.5.4.tar.gz
  • Upload date:
  • Size: 160.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for simpleapps_com_augur_api-2026.5.4.tar.gz
Algorithm Hash digest
SHA256 9bf689d2c1299b791da950668b43270ee77e30026669accb4b69b04a01eacce9
MD5 c7aba9ccc5cf26b30d0cea4d6a1a2657
BLAKE2b-256 e6c978217c5a83979beb58f7d27089f628e5c2598a16b86123707a0b4149ac3e

See more details on using hashes here.

File details

Details for the file simpleapps_com_augur_api-2026.5.4-py3-none-any.whl.

File metadata

  • Download URL: simpleapps_com_augur_api-2026.5.4-py3-none-any.whl
  • Upload date:
  • Size: 96.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for simpleapps_com_augur_api-2026.5.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b73fa8f66438b93180e8015a6fa953823ec8c3e22207fce135a2312592348a7a
MD5 c9b019dbc87003d2d3a05a30147f1efd
BLAKE2b-256 89648f2a7c24e274a883defa99f3ac6d9d3d8d0a0e608aa59f23aad897bb9bfa

See more details on using hashes here.

Supported by

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