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-abstractionsmicrosoft-kiota-httpmicrosoft-kiota-serialization-jsonmicrosoft-kiota-serialization-textmicrosoft-kiota-serialization-formmicrosoft-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
- API reference and guides: https://teambattles.gg/docs/developers
- SDKs overview: https://teambattles.gg/docs/sdks
- This SDK: https://teambattles.gg/docs/sdks/python
- Authentication: https://teambattles.gg/docs/developers/authentication
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 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da057b92df5b342e7d33ad8fd5441dcc218e38f433ae5673178971bd5f32696f
|
|
| MD5 |
5ec0a95920d309eec11a07810255762d
|
|
| BLAKE2b-256 |
bdc692b5a2238a0ae7ce27821c474be2d5f73ed963326afbe0c40fc4dab5e112
|
Provenance
The following attestation bundles were made for teambattles_sdk-0.1.0.tar.gz:
Publisher:
sdks.yml on KarandeepSWranch/teambattles
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
teambattles_sdk-0.1.0.tar.gz -
Subject digest:
da057b92df5b342e7d33ad8fd5441dcc218e38f433ae5673178971bd5f32696f - Sigstore transparency entry: 1786228084
- Sigstore integration time:
-
Permalink:
KarandeepSWranch/teambattles@2a4b6e5446fd447b1626a3d0b14ab35f5abc89e8 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/KarandeepSWranch
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
sdks.yml@2a4b6e5446fd447b1626a3d0b14ab35f5abc89e8 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a8ae9133d661a954ed8e42cd3b2b244e739adca1d91ee7a5c03ef943727d4c5
|
|
| MD5 |
97919981929c5fb3014df7a4f050a310
|
|
| BLAKE2b-256 |
58b1755824dcc7de9cb32a4bfbd911fe0677ed61661a98408a9f13030aae038e
|
Provenance
The following attestation bundles were made for teambattles_sdk-0.1.0-py3-none-any.whl:
Publisher:
sdks.yml on KarandeepSWranch/teambattles
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
teambattles_sdk-0.1.0-py3-none-any.whl -
Subject digest:
7a8ae9133d661a954ed8e42cd3b2b244e739adca1d91ee7a5c03ef943727d4c5 - Sigstore transparency entry: 1786228183
- Sigstore integration time:
-
Permalink:
KarandeepSWranch/teambattles@2a4b6e5446fd447b1626a3d0b14ab35f5abc89e8 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/KarandeepSWranch
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
sdks.yml@2a4b6e5446fd447b1626a3d0b14ab35f5abc89e8 -
Trigger Event:
push
-
Statement type: