A modern, type-safe Python library for interacting with the Geometry Dash private API.
- Sync & Async - Both synchronous (
Client) and asynchronous (AsyncClient) interfaces - Modern HTTP - Built with
httpxfor both sync and async operations - Type-safe - Full type hints with runtime validation via Pydantic
- Custom servers - Connect to private GD servers via
base_urlparameter - Built-in crypto - XOR cipher, GJP2 encoding, base64 utilities, and checksums
- Comprehensive errors - Full exception hierarchy for different error scenarios
pip install gdpyOr using uv:
uv pip install gdpyfrom gdpy import Client
with Client() as client:
# Get user info
user = client.get_user(account_id=71) # RobTop
print(f"Username: {user.username}")
print(f"Stars: {user.stars}")
# Search levels
levels = client.search_levels(query="ReTraY", limit=5)
for level in levels:
print(f"{level.name} - {level.downloads} downloads")import asyncio
from gdpy import AsyncClient
async def main():
async with AsyncClient() as client:
# Get user info
user = await client.get_user(account_id=71) # RobTop
print(f"Username: {user.username}")
print(f"Stars: {user.stars}")
# Search levels
levels = await client.search_levels(query="ReTraY", limit=5)
for level in levels:
print(f"{level.name} - {level.downloads} downloads")
asyncio.run(main())from gdpy import Client
# Connect to a private GD server
with Client(base_url="https://your-server.com/database") as client:
user = client.get_user(account_id=1)Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'feat: add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
MIT