Standard Library

Standard library

The standard library ships 22 canonical modules. They are not loaded by default - import them when you need them.

ModuleImportPurpose
Bytesimport bytesBinary data, encoding/decoding (base64, hex)
CLIimport cliCommand-line argument parsing
Collectionsfrom collections import ...List, dict, and set operations (map, filter, reduce, keys, values, etc.)
Cryptoimport cryptoHashing, encryption, HMAC, signatures, encoding
CSVimport csvRFC 4180 CSV parsing and writing
Decimalimport decimalArbitrary-precision decimal arithmetic
Environmentimport envEnvironment variable access
Filesystemimport fsFile I/O with typed paths and Result returns
HTTPimport httpHTTP client (GET, POST, PUT, DELETE) and static file server
JSONimport jsonTree API, streaming, mutable building
JSON Schemaimport json_schemaSchema-based JSON validation
Loggingimport logLog level, sink, capture
Mathimport mathTrigonometry, logarithms, rounding, constants
Moneyimport moneyCurrency-safe monetary arithmetic
Pathimport pathPure path manipulation utilities
Processimport processSubprocess execution, argv, exit, cwd
Randomimport randomRandom integer generation
Scannerimport scannerText scanning and pattern matching
Textimport textString utilities (split, join, trim, pad, etc.)
Timeimport timeInstant, Duration, Clock. Typed time API
URLimport urlURL parsing, building, and query encoding
UUIDimport uuidUUID v4 generation, parsing, and validation
← Built-in functions