Skip to main content

Official Python SDK for the Stadar esports API (stadar.net)

Project description

stadar — Python SDK for the Stadar esports API

Official Python client. Pip-installable. Type-hinted. Generated from the public OpenAPI 3.1 spec — see stadar.net/docs/api for the full reference and clients/README.md in the monorepo for the codegen posture.

pip install stadar

Quick start

from stadar import Client

# Reads $STADAR_API_KEY from env, with $STADAR_API_URL override.
client = Client.from_env()

# Or pass explicitly:
client = Client(api_key="esp_live_...", base_url="https://api.stadar.net")

matches = client.matches.list(game="cs2", status="live")
for m in matches.data:
    print(m.id, m.team_a.slug, "vs", m.team_b.slug)

Sandbox

# `esp_test_`-prefixed keys auto-route to the sandbox fixture set.
# `meta.sandbox: true` flags every response from the sandbox.
client = Client(api_key="esp_test_...")

Webhooks

from stadar.webhooks import verify_signature

@app.post("/stadar-webhook")
def handle(request):
    body = request.body  # raw bytes
    signature = request.headers["X-Stadar-Signature"]
    if not verify_signature(body, signature, secret="your-webhook-secret"):
        return 401
    event = parse_event(body)
    # ... handle event

See stadar.net/docs/webhooks for the signature verification recipe.

License

MIT. Source of truth is the OpenAPI spec; regeneration is part of every spec change.

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

stadar-0.1.24.tar.gz (79.7 kB view details)

Uploaded Source

Built Distribution

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

stadar-0.1.24-py3-none-any.whl (254.3 kB view details)

Uploaded Python 3

File details

Details for the file stadar-0.1.24.tar.gz.

File metadata

  • Download URL: stadar-0.1.24.tar.gz
  • Upload date:
  • Size: 79.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for stadar-0.1.24.tar.gz
Algorithm Hash digest
SHA256 8382570b050e7f05ea75c011df69692965b779958952099f86179d5199a1b90e
MD5 bcad4153ee086df037dce5c12dffeed6
BLAKE2b-256 eca316b6a3c98aacac25ac349286a4a3612800787f98d633939af7449595108a

See more details on using hashes here.

Provenance

The following attestation bundles were made for stadar-0.1.24.tar.gz:

Publisher: sdk-publish.yml on GsiorX/stadar

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file stadar-0.1.24-py3-none-any.whl.

File metadata

  • Download URL: stadar-0.1.24-py3-none-any.whl
  • Upload date:
  • Size: 254.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for stadar-0.1.24-py3-none-any.whl
Algorithm Hash digest
SHA256 cdf2245f5d9d4bb592da721071ffd9cedb3d171dca18c514c70d0c118ea30795
MD5 095721d586f950437b4711e1922eb88c
BLAKE2b-256 13d312f151f79159876a12985e76c3c0eb43710ab012c28ed637d47f82394906

See more details on using hashes here.

Provenance

The following attestation bundles were made for stadar-0.1.24-py3-none-any.whl:

Publisher: sdk-publish.yml on GsiorX/stadar

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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