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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gdformat-0.2.1.tar.gz.
File metadata
- Download URL: gdformat-0.2.1.tar.gz
- Upload date:
- Size: 30.1 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f305fd0a940c2ae7be769f5397fdb087f7ba839bf108b1c57efdfe459d982c47
|
|
| MD5 |
7b55a83016d47c4e680f44710589067e
|
|
| BLAKE2b-256 |
c646cc549b417a3c3c1a8c49c0b6a94c550b3f5494c9cff303e9c4059ad0176d
|
File details
Details for the file gdformat-0.2.1-py3-none-any.whl.
File metadata
- Download URL: gdformat-0.2.1-py3-none-any.whl
- Upload date:
- Size: 47.2 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
df0aa529fb6fb467491986d2a2af3e0491418a5ad304e3f08e35b46641832033
|
|
| MD5 |
df3f8b6910812ef671c9533a6d4e3040
|
|
| BLAKE2b-256 |
aa9ff5de024d042c27f129ad3220be6ae130e848f05d0d679b41ca60abb5ba0f
|