Skip to content

Repository files navigation

gdpy

LicensePythonDocs

A modern, type-safe Python library for interacting with the Geometry Dash private API.

Documentation | API Coverage

Features

  • Sync & Async - Both synchronous (Client) and asynchronous (AsyncClient) interfaces
  • Modern HTTP - Built with httpx for both sync and async operations
  • Type-safe - Full type hints with runtime validation via Pydantic
  • Custom servers - Connect to private GD servers via base_url parameter
  • Built-in crypto - XOR cipher, GJP2 encoding, base64 utilities, and checksums
  • Comprehensive errors - Full exception hierarchy for different error scenarios

Installation

pip install gdpy

Or using uv:

uv pip install gdpy

Quick Start

Synchronous

fromgdpyimportClientwithClient() asclient:
# Get user infouser=client.get_user(account_id=71) # RobTopprint(f"Username: {user.username}")
print(f"Stars: {user.stars}")
# Search levelslevels=client.search_levels(query="ReTraY", limit=5)
forlevelinlevels:
print(f"{level.name} - {level.downloads} downloads")

Asynchronous

importasynciofromgdpyimportAsyncClientasyncdefmain():
asyncwithAsyncClient() asclient:
# Get user infouser=awaitclient.get_user(account_id=71) # RobTopprint(f"Username: {user.username}")
print(f"Stars: {user.stars}")
# Search levelslevels=awaitclient.search_levels(query="ReTraY", limit=5)
forlevelinlevels:
print(f"{level.name} - {level.downloads} downloads")
asyncio.run(main())

Custom Server

fromgdpyimportClient# Connect to a private GD serverwithClient(base_url="https://your-server.com/database") asclient:
user=client.get_user(account_id=1)

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'feat: add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

MIT

About

A modern Python client for the Geometry Dash API.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages