An API wrapper for Geometry Dash written in Python.


Keywords
python, gd, api, client, memory, server
License
MIT
Install
pip install gd.py==1.0.1

Documentation

gd.py

Project License Build Status PyPI Library Version Required Python Versions Project Development Status Library Downloads/Week Documentation Status Code Quality [Codacy] Code Coverage

gd.py is a library that provides its users ability to interact with servers, client and memory of Geometry Dash.

Key Features

  • Modern Pythonic API
  • High coverage of the supported Geometry Dash API
  • Using async and await syntax

Installing

Python 3.6 or higher is required

To install the library, you can just run the following command:

# Linux/OS X
python3 -m pip install -U gd.py

# Windows
py -3 -m pip install -U gd.py

Additional Dependencies

There are many dependencies that either extend functionality of the library or are used in its development.

  • crypto is required to decrypt saves on MacOS;
  • console is needed to run IPython console;
  • docs are used to build docs;
  • image installs PIL/Pillow for icon generating;
  • lint adds formatters and linters to check improve code style;
  • server is used for creating REST API around the library;
  • speedups provides packages to speed the library up;
  • test is required to run tests and check coverage.

You can install some extras like this:

python -m pip install gd.py[image,speedups]

Install recommended ones:

python -m pip install gd.py[prelude]

Or install all of them:

python -m pip install gd.py[all]

Development Version

You can install latest development version from GitHub:

$ git clone https://github.com/nekitdev/gd.py.git
$ cd gd.py
$ python3 -m pip install -U .[all]

Quick example

Below is an example of fetching a song by its ID.

import gd

client = gd.Client()

async def test():
    song = await client.get_song(633206)
    print(song.name)

client.run(test())

# OUTPUT: Random Song 01

You can find more examples in examples directory.

Server

gd.py provides server with wrapper around itself, which can be started via a command:

$ python3 -m gd server

Credits

Thanks to Alex1304 for inspiring the creation of this library.

Credits to Rapptz and discord.py library developers; tasks package in discord.py is a base for gd.tasks module.

Authors

This project is mainly developed by nekitdev. Big thanks to cos8o and SMJS for helping to make several requests. Also thanks to cos8o again for developing GDCrypto library, which was used as a base for gd.crypto module.

Links