Skip to main content

gdformat

Parser and builder for the Geometry Dash 2.2 server protocol. It covers the wire objects, the full endpoint response envelopes and typed parsing of every endpoint's form parameters, so a server never handles the raw format itself.

Only the latest game version is supported. Python 3.14, managed with uv, no runtime dependencies.

Layout

Module Contents
gdformat.objects Frozen dataclasses for each wire object (Level, User, Comment, Song, ...) with serialise_* / parse_* functions.
gdformat.responses One serialise_* per endpoint response, producing the exact string to send.
gdformat.requests One *Request dataclass and parse_* per endpoint, taking the POST form. verify_* helpers check the client integrity values.
gdformat.crypto XOR keys and salts, gjp2, chk generation, response hashes, level passwords, leaderboard seeds.
gdformat.encoding Base64, XOR, level string compression, URL quoting, relative age strings.
gdformat.enums Every discriminant the protocol uses.
gdformat.codes Documented numeric response codes.

Usage

from gdformat import is_error, objects, requests, responses

def download_level(form: dict[str, str]) -> str:
    request = requests.parse_download_level(form)
    if is_error(request):
        return "-1"

    level = objects.Level(...)  # Built from your storage.
    return responses.serialise_level_download(level, songs)

Failures are values: every parser returns T | ParseError, narrowed with is_error / is_success. Nothing in the library raises.

Download files

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

Source Distribution

gdformat-0.2.0.tar.gz (30.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gdformat-0.2.0-py3-none-any.whl (47.1 kB view details)

Uploaded Python 3

File details

Details for the file gdformat-0.2.0.tar.gz.

File metadata

  • Download URL: gdformat-0.2.0.tar.gz
  • Upload date:
  • Size: 30.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for gdformat-0.2.0.tar.gz
Algorithm Hash digest
SHA256 133b78b0e9df8371d690edc3dfbb133744f1099fcabda2f02d22280ca20c866f
MD5 b842539b866aa5ae254a2b072b06a2e9
BLAKE2b-256 7dca6c040929060133d10ef1745725ff347dcf8c287034e84ed5a87f78b73cbc

See more details on using hashes here.

File details

Details for the file gdformat-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: gdformat-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 47.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for gdformat-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a6a55424017eb938edea99e2bba1fc827a8ac3db94efc1b4445b86d875b4dcd4
MD5 a26a873ab4d9d9359cae8a6c6aecb3e9
BLAKE2b-256 d482c18759cd78170525bd5aaa91b0387899ae662575b362869dfdff28f1363a

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.1

2 files

This release

0.2.0 This release

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page