API reference
GD
Entry to the standard features of a command-line program: files, data, async, time, and more.
Properties
async: GD.asyncEntry for async work: waiting, concurrency, racing, timeouts, and cancellation. spawn starts a main-thread coroutine; CPU work belongs in each standard module's _async entry points.
log: GD.logEntry for ordered I/O of one line at a time with a consistent level, time, and destination. flush waits for earlier output.
net: GD.netNetwork entry for TCP and TLS streams, listeners, UDP packets, name resolution, and address checks. TLS verifies the certificate chain and server name by default; waiting operations suspend only their caller.
mail: GD.mailParse mail addresses, dates, and headers, and submit messages over SMTP. STARTTLS upgrades the existing connection without falling back to plaintext. MIME helpers are under GD.mail.mime.
http: GD.httpEntry for HTTP requests plus URL, query, and media-type handling. fetch suspends only its caller; fetch_async returns a Signal for composition.
web: GD.webEntry for building websites and Web APIs, with routes, static files, gdhtml templates, sessions, CSRF, JWT, rate limiting, and input validation.
file: GD.fileWhole-file operations and streaming file I/O suspend only their caller. This entry also provides path operations and file-format readers; *_async returns Signals for concurrent starts.
collection: GD.collectionReshape Arrays and Dictionaries and create heaps, queues, and caches. Awaitable operations use CPU workers or the runtime ready queue; callable work cooperates with other tasks without requiring SceneTree frames.
data: GD.dataData conversion for bytes, binary codecs, hashes, key derivation, and in-memory CSV, INI, TOML, YAML, JSON, XML, and related formats. Invalid input and settings return failures.
id: GD.idEntry for generating and checking UUIDs and time-ordered ULIDs. Timestamp -1 selects the current time; other values outside the 48-bit range return an empty string. Encoded overflow is rejected.
text: GD.textEntry for formatting and comparing text.
html: GD.htmlEntry for HTML entities, tags, and templates with context-sensitive escaping for text, attributes, URLs, styles, and scripts.
math: GD.mathEntry for standard mathematical functions, IEEE 754 special values, and bit conversions.
version: GD.versionEntry for parsing, comparing, and range-matching Semantic Versions.
time: GD.timeEntry for converting and computing Unix time, ISO 8601, and HTTP dates. parse_iso accepts RFC 3339, and add and diff clamp at the 64-bit integer ends.
cli: GD.cliEntry for gd's version and docs, flags, and allowed environment and system information.
test: GD.testEntry for small test helpers that collect asserts.
database: GD.databaseDatabase entry shared by SQLite and PostgreSQL. Synchronous-looking calls suspend only their GDScript; *_async returns Signals for composition.
online: GD.onlineManage matchmaking destinations for online games. Online and Secret in gd-godot handle game synchronization and guest authentication.