Official Python SDK for the We Playtest Games API
Project description
We Playtest Games - Python SDK
Official Python SDK for the We Playtest Games API.
Installation
pip install weplaytestgames
Quickstart
Synchronous
from weplaytestgames import WPGClient
with WPGClient(api_key="wpg_sk_...") as client:
# List your games
page = client.games.list().get_page()
print(page.data)
# Create a game
game = client.games.create(
name="My Game",
build_url="https://store.steampowered.com/app/123456",
)
# Order playtests
result = client.playtests.create(
game_id=game["id"],
visibility="public",
quantity=3,
duration_minutes=60,
)
Async
from weplaytestgames import AsyncWPGClient
async with AsyncWPGClient(api_key="wpg_sk_...") as client:
page = await client.games.list().get_page()
game = await client.games.create(name="My Game", build_url="https://example.com")
Authentication
Get an API key from your dashboard or register programmatically:
result = WPGClient.register_with_api_key(
email="studio@example.com",
password="securepassword",
company_name="My Studio",
)
api_key = result["api_key"]
Features
- TypedDict responses - All responses use typed dictionaries with snake_case keys
- Sync and async -
WPGClientfor synchronous code,AsyncWPGClientfor async - Pagination - Cursor-based pagination with
get_page()andget_all()helpers - Retry with backoff - Automatic retries on 429/5xx errors with exponential backoff (configurable via
max_retries) - Webhook verification -
verify_webhook_signature()with replay protection - Idempotency - Pass idempotency keys to mutating operations
Configuration
client = WPGClient(
api_key="wpg_sk_...",
base_url="https://app.weplaytestgames.com/api/v1", # default
timeout=30.0, # seconds, default 30
max_retries=2, # default 2 (3 total attempts), 0 to disable
)
Available Resources
| Resource | Methods |
|---|---|
client.auth |
me(), profile(), update_profile(), categories(), devices() |
client.games |
list(), get(), create(), update() |
client.playtests |
list(), get(), create(), update() |
client.slots |
get(), accept(), reject(), download_url(), transcript() |
client.submissions |
list(), get() |
client.billing |
get_balance(), payments(), get_payment(), purchase_credit() |
client.chat |
contacts(), conversation(), send_message(), unread_count() |
client.webhooks |
list(), create(), update(), delete(), test(), deliveries() |
client.notifications |
list(), mark_read(), mark_all_read() |
client.dashboard |
stats() |
Webhook Verification
from weplaytestgames import verify_webhook_signature
is_valid = verify_webhook_signature(
payload=raw_body,
signature=request.headers["X-WPG-Signature"],
timestamp=request.headers["X-WPG-Timestamp"],
secret=webhook_secret,
)
Documentation
Full API documentation: weplaytestgames.com/docs
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 weplaytestgames-0.1.0.tar.gz.
File metadata
- Download URL: weplaytestgames-0.1.0.tar.gz
- Upload date:
- Size: 16.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
473b6687ba292b83d982e9d3a94e0ff117c2bcf1dd848819f2fef1a5284d346e
|
|
| MD5 |
3eb255236f88a2eb678d1c1c2cdd8c61
|
|
| BLAKE2b-256 |
507c8734c9a193639ba3c53601218679a809eee0808b88745df1b2e706d2a3f9
|
Provenance
The following attestation bundles were made for weplaytestgames-0.1.0.tar.gz:
Publisher:
publish.yml on WePlaytestGames/sdk-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
weplaytestgames-0.1.0.tar.gz -
Subject digest:
473b6687ba292b83d982e9d3a94e0ff117c2bcf1dd848819f2fef1a5284d346e - Sigstore transparency entry: 1015806479
- Sigstore integration time:
-
Permalink:
WePlaytestGames/sdk-python@c0291b2441a6ca704b14e6937b6f2dc6701832ee -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/WePlaytestGames
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c0291b2441a6ca704b14e6937b6f2dc6701832ee -
Trigger Event:
release
-
Statement type:
File details
Details for the file weplaytestgames-0.1.0-py3-none-any.whl.
File metadata
- Download URL: weplaytestgames-0.1.0-py3-none-any.whl
- Upload date:
- Size: 20.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5473fb4ced44414ef8e2e0e347af84a288b031938ef522d3efb5aefbe14e773f
|
|
| MD5 |
ca4ad3c13437fc48e1e81617423b5889
|
|
| BLAKE2b-256 |
76b4a532197cc52feb6afdb4cccac48e8f17cdfbd79cbd4a174c267c8cd10e75
|
Provenance
The following attestation bundles were made for weplaytestgames-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on WePlaytestGames/sdk-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
weplaytestgames-0.1.0-py3-none-any.whl -
Subject digest:
5473fb4ced44414ef8e2e0e347af84a288b031938ef522d3efb5aefbe14e773f - Sigstore transparency entry: 1015806530
- Sigstore integration time:
-
Permalink:
WePlaytestGames/sdk-python@c0291b2441a6ca704b14e6937b6f2dc6701832ee -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/WePlaytestGames
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c0291b2441a6ca704b14e6937b6f2dc6701832ee -
Trigger Event:
release
-
Statement type: