Skip to main content

Official Python SDK for the TeamBattles public developer API.

Project description

teambattles-sdk

Official Python SDK for the TeamBattles public developer API.

Auto-generated from the TeamBattles OpenAPI 3.1 specification with Microsoft Kiota. This README is generated by pnpm sdk:docs and regenerates on every API change - do not edit it by hand.

  • Language: Python
  • Registry: PyPI
  • Maturity: Stable

Install

pip install teambattles-sdk

Dependencies

The generated client is a thin veneer over the shared Kiota runtime. This package depends on:

  • microsoft-kiota-abstractions
  • microsoft-kiota-http
  • microsoft-kiota-serialization-json
  • microsoft-kiota-serialization-text
  • microsoft-kiota-serialization-form
  • microsoft-kiota-serialization-multipart

Create a client

Construct a client once with your API key. The factory wires a bearer-token authentication provider and points the client at the production base URL.

import os
from teambattles_sdk import create_teambattles_client

client = create_teambattles_client(os.environ["TEAMBATTLES_API_KEY"])

First call: list the authenticated user's matches

# List the authenticated user's matches (requires matches.user_matches: read)
from teambattles_sdk.models import MatchesRequestBody

result = await client.user.matches.post(MatchesRequestBody(num_items=25))
for match in result.page or []:
    print(match.id, match.status)

Authentication

Every request is authenticated with an API key sent as a bearer token:

Authorization: Bearer tb_<your-key>

Create and manage keys at Settings > Developer. Keys carry granular permission scopes - listing the authenticated user's matches requires matches.user_matches: read.

Errors return a JSON body of the form { "error": "<machine_code>", "details": "<optional message>" }. Treat the error machine code - not the details message - as the stable programmatic contract: branch on error, and use details only for human-readable context (it may be absent on auth and permission errors).

Documentation

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

teambattles_sdk-0.1.0.tar.gz (174.5 kB view details)

Uploaded Source

Built Distribution

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

teambattles_sdk-0.1.0-py3-none-any.whl (881.5 kB view details)

Uploaded Python 3

File details

Details for the file teambattles_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: teambattles_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 174.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for teambattles_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 da057b92df5b342e7d33ad8fd5441dcc218e38f433ae5673178971bd5f32696f
MD5 5ec0a95920d309eec11a07810255762d
BLAKE2b-256 bdc692b5a2238a0ae7ce27821c474be2d5f73ed963326afbe0c40fc4dab5e112

See more details on using hashes here.

Provenance

The following attestation bundles were made for teambattles_sdk-0.1.0.tar.gz:

Publisher: sdks.yml on KarandeepSWranch/teambattles

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

File details

Details for the file teambattles_sdk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: teambattles_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 881.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for teambattles_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7a8ae9133d661a954ed8e42cd3b2b244e739adca1d91ee7a5c03ef943727d4c5
MD5 97919981929c5fb3014df7a4f050a310
BLAKE2b-256 58b1755824dcc7de9cb32a4bfbd911fe0677ed61661a98408a9f13030aae038e

See more details on using hashes here.

Provenance

The following attestation bundles were made for teambattles_sdk-0.1.0-py3-none-any.whl:

Publisher: sdks.yml on KarandeepSWranch/teambattles

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