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, plus parse_level_download for reading an official level download.
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.

Metadata

Release files for gdformat 0.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gdformat 0.2.4
File Size Uploaded Provenance Actions
gdformat-0.2.4.tar.gz 30.5 kB Without provenance Details for gdformat-0.2.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gdformat 0.2.4
File Interpreter ABI Platform Actions
gdformat-0.2.4-py3-none-any.whl Python 3 none any Details for gdformat-0.2.4-py3-none-any.whl

Total release size: 78.2 kB

Release files / gdformat-0.2.4.tar.gz

Download URL gdformat-0.2.4.tar.gz
Size 30.5 kB
Tags Source
SHA-256 checksum
How to use checksums
afc68fa3f6cfe492bbcb22ce3756f95895464728fcf8dcd3ec63553fa975dbbf
BLAKE2b-256 checksum
How to use checksums
f7e6fd651b2d062064068eaed11ddd785268589475fbaccd85c699a3068e0cca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","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}

Release files / gdformat-0.2.4-py3-none-any.whl

Download URL gdformat-0.2.4-py3-none-any.whl
Size 47.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
188c7ee6f89d54906e7fb68d58ac1e502fa8289a3745c42e37eb6eaa18a5020b
BLAKE2b-256 checksum
How to use checksums
9b4f69f5143fa22ccf1579cb902720bb66324af95920b1a07e8057371850d858
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","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}

Security for gdformat 0.2.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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