WOK API client for Python
Dependency-free synchronous client for the
WOK Steam API. It is distributed as the single
wok_api module and uses only the Python standard library at runtime.
Requirements
- Python 3.10 or newer
- A WOK API key
For development, the Free Developer plan provides 1,000 requests per calendar month, a 100-request daily guard and 30 requests per minute. Create a key at https://woksteamapi.com/pricing.
Keep the API key in a server-side environment variable or secret store. Do not commit it to source control or send it to browser clients.
Install
python -m pip install wok-api
Usage
import os
from wok_api import WokApi, WokApiError
client = WokApi(os.environ["WOK_API_KEY"])
steam_id = os.environ["STEAM_ID"]
try:
inventory = client.inventory(
steam_id,
game="cs2",
top=25,
)
print(inventory)
except WokApiError as error:
print(error.status, error, error.retry_after)
The client also exposes methods for profiles, friends, catalog prices, price history, CS2 inspection, crawl jobs, FACEIT data, and service health. See the API reference for request and response shapes.
Render a modern CS2 inspect certificate as PNG bytes:
png = client.cs2_screenshot(
certificate=os.environ["CS2_INSPECT_CERTIFICATE"],
theme="wok",
item_name="AK-47 | Redline (Field-Tested)",
)
with open("wok-cs2-inspect.png", "wb") as output:
output.write(png)
WokApiError provides status, payload, retry_after, rate_limit,
rate_remaining, and rate_reset. Wait at least retry_after seconds after
HTTP 429. Network failures use status 0.
The default timeout is 35 seconds so the 25-second synchronous inventory batch
can finish. Do not configure /v1/inventories with a timeout below 30 seconds.
For testing or a compatible deployment, pass base_url, timeout, or a custom
transport to the constructor.
Build the package
python -m build
The command creates both an sdist and a wheel under dist/.
Release files for wok-api 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| wok_api-1.2.0.tar.gz | 5.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| wok_api-1.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.4 kB
Release files / wok_api-1.2.0.tar.gz
| Download URL | wok_api-1.2.0.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a23e1058c9efb5a92c017464b4a8272f3aaf3864531dadfe3348da5ff1f49ed7
|
|
BLAKE2b-256 checksum How to use checksums |
2f913ef12fca88c015c0dd8f7f647b5f7fdde6f897b97f58f65149d86e457466
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|
Release files / wok_api-1.2.0-py3-none-any.whl
| Download URL | wok_api-1.2.0-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
79a69f47d47c299caf2fdd69af32b66ca1c45e59dba25cb070961019d8e0818d
|
|
BLAKE2b-256 checksum How to use checksums |
9ed4743962d0854c56bebe4a8b0ae82eef7565103b6194cdbf32124bd3728145
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|