Registry / http-networking / topk-sdk

topk-sdk

JSON →
library0.11.0pypypi✓ verified 83d ago

Official Python SDK for TopK.io, a real-time rankings and leaderboard API. Version 0.8.1 supports Python >=3.9. Active development with frequent releases.

pip install topk-sdk
INSTALL
IMPORT
SIG · TOPK-SDK
T
topk-sdk
http-networkingpythonv0.11.0
Install
4.7s avg
Import
—
Disk
102MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v0.11.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 102.3MB
glibc
py 3.10–3.95 runs
installs and imports cleanly · install 4.7s · import 0.000s · 99MB
102MB installed
● package 102MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Client
✓ from topk_sdk import Client
✗ from topk import TopKClient
AsyncClient
✓ from topk_sdk import AsyncClient
Answer
✓ from topk_sdk import Answer

Initialize client with env vars, upsert a score, and retrieve the top 10 leaderboard.

import os from topk import TopKClient client = TopKClient( api_key=os.environ.get('TOPK_API_KEY', ''), project_id=os.environ.get('TOPK_PROJECT_ID', '') ) # Upsert a score response = client.upsert_score( leaderboard='global', user_id='user123', score=1000 ) print(response) # Get leaderboard leaderboard = client.get_leaderboard(leaderboard='global', limit=10) print(leaderboard)
Debug
Known issues
breakingIn version 0.6.0, the client initialization changed from positional arguments to keyword-only parameters.
fix
Use keyword arguments: TopKClient(api_key='...', project_id='...') instead of TopKClient('...', '...').
affects: >=0.6.0
gotchaThe SDK only supports asynchronous methods? No — all methods are synchronous by default. There is no async support currently.
fix
Call methods directly without await; they return immediately.
affects: all
gotchaThe 'leaderboard' parameter in upsert_score and get_leaderboard is case-sensitive and must match exactly what was created in the TopK dashboard.
fix
Verify the leaderboard name in your TopK dashboard and use identical casing.
affects: all
Upgrade
Version history
0.11.0latest on PyPI · released Jun 3, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
38 hits · last 30 days
node
34
Bingbot
1
OpenAI (training)
1
Resources
topk-sdk — pip install topk-sdk · libregistry