Skip to main content

An API wrapper for Geometry Dash written in Python.

Project description

gd.py

License Version Downloads Discord

Documentation Check Test Coverage

An API wrapper for Geometry Dash written in Python.

Installing

Python 3.7 or above is required.

pip

Installing the library with pip is quite simple:

$ pip install gd.py

Alternatively, the library can be installed from source:

$ git clone https://github.com/nekitdev/gd.py.git
$ cd gd.py
$ python -m pip install .

poetry

You can add gd.py as a dependency with the following command:

$ poetry add gd.py

Or by directly specifying it in the configuration like so:

[tool.poetry.dependencies]
"gd.py" = "^1.0.1"

Alternatively, you can add it directly from the source:

[tool.poetry.dependencies."gd.py"]
git = "https://github.com/nekitdev/gd.py.git"

Examples

Fetching

# file.py

import asyncio

import gd

SONG_ID = 1081309
SONG = "{} by {} (ID: {}, size: {} MB)"


async def main() -> None:
    client = gd.Client()

    song = await client.get_song(SONG_ID)

    print(SONG.format(song.name, song.artist.name, song.id, song.size))


asyncio.run(main())
$ python file.py
PANDA EYES - BROKEN by PandaEyesOfficial (ID: 1081309, size: 9.71 MB)

Listening

import gd

client = gd.Client()

DAILY = "new daily! {daily.name} by {daily.creator.name} (ID: {daily.id})"


@client.event
async def on_daily(daily: gd.Level) -> None:
    print(DAILY.format(daily=daily))


client.listen_for_daily()

client.create_controller().run()

Documentation

You can find the documentation here.

Support

If you need support with the library, you can send an email or refer to the official Discord server.

Changelog

You can find the changelog here.

Security Policy

You can find the Security Policy of gd.py here.

Contributing

If you are interested in contributing to gd.py, make sure to take a look at the Contributing Guide, as well as the Code of Conduct.

License

gd.py is licensed under the MIT License terms. See License for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gd_py-1.0.1.tar.gz (5.4 MB view hashes)

Uploaded Source

Built Distributions

gd_py-1.0.1-cp311-cp311-win_amd64.whl (5.6 MB view hashes)

Uploaded CPython 3.11 Windows x86-64

gd_py-1.0.1-cp311-cp311-manylinux_2_35_x86_64.whl (6.5 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.35+ x86-64

gd_py-1.0.1-cp311-cp311-macosx_12_0_x86_64.whl (5.7 MB view hashes)

Uploaded CPython 3.11 macOS 12.0+ x86-64

gd_py-1.0.1-cp310-cp310-win_amd64.whl (5.6 MB view hashes)

Uploaded CPython 3.10 Windows x86-64

gd_py-1.0.1-cp310-cp310-manylinux_2_35_x86_64.whl (6.5 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.35+ x86-64

gd_py-1.0.1-cp310-cp310-macosx_12_0_x86_64.whl (5.7 MB view hashes)

Uploaded CPython 3.10 macOS 12.0+ x86-64

gd_py-1.0.1-cp39-cp39-win_amd64.whl (5.6 MB view hashes)

Uploaded CPython 3.9 Windows x86-64

gd_py-1.0.1-cp39-cp39-manylinux_2_35_x86_64.whl (6.5 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.35+ x86-64

gd_py-1.0.1-cp39-cp39-macosx_12_0_x86_64.whl (5.7 MB view hashes)

Uploaded CPython 3.9 macOS 12.0+ x86-64

gd_py-1.0.1-cp38-cp38-win_amd64.whl (5.6 MB view hashes)

Uploaded CPython 3.8 Windows x86-64

gd_py-1.0.1-cp38-cp38-manylinux_2_35_x86_64.whl (6.5 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.35+ x86-64

gd_py-1.0.1-cp38-cp38-macosx_12_0_x86_64.whl (5.7 MB view hashes)

Uploaded CPython 3.8 macOS 12.0+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page