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.1.0.tar.gz (29.8 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.1.0-py3-none-any.whl (46.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gdformat-0.1.0.tar.gz
  • Upload date:
  • Size: 29.8 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.1.0.tar.gz
Algorithm Hash digest
SHA256 489d16b3e278740c52949b3aeece5f6e6fb33dff491763590e23d7b90e5985e5
MD5 c7c5c596c599a4c4a1dd6c596bf4b08b
BLAKE2b-256 190ba60aba442d706e3f97348065eb4c6441e63d10f27be92210905185a495fb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gdformat-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 46.9 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a91fa5ee3142978cce0985fad1aca65205d3f7ee4fe0c5f28767b878f8f071b7
MD5 66ce86176941ccb050720c82c61e84f3
BLAKE2b-256 675f2af1ad01f053ccdf098a89db5d871e32172cadd495e6cc9701b6787867a8

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.1

2 files

0.2.0

2 files

This release

0.1.0 This release

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