Documentation Index
Fetch the complete documentation index at: https://ahvn.top/llms.txt
Use this file to discover all available pages before exploring further.
Serialization helpers give HeavenBase one small contract for reading and writing local data files.
1. JSON and YAML
Use JSON for machine-readable artifacts, configs, and benchmark output. Missing non-strict files return{} so optional local files are easy to read.
Text encodings default to heavenbase.serialize.encoding (utf-8 by default), and JSON/YAML indentation defaults to heavenbase.serialize.indent (4 by default). Pass encoding=... or indent=... when a file needs a local override.
load_yaml, dump_yaml, loads_yaml, and dumps_yaml.
2. Text and JSONL streams
Usesave_txt for human-readable output. It writes a trailing newline, which keeps generated Markdown and logs tidy.
append_txt, iter_txt, append_jsonl, and iter_jsonl for streaming-style files that grow one record at a time.
3. Binary, Base64, hex, and pickle
Usedump_bin and load_bin for raw bytes. load_b64 and load_hex encode an existing binary file to a string; dump_b64 and dump_hex decode a string and write the resulting bytes.
dump_pickle, load_pickle, save_pickle, dumps_pickle, and loads_pickle are also exposed for readability.
4. Round-trip behavior
JSON helpers preserve common Python values such as tuples, sets, dates,Decimal, and large integers through small type markers. That keeps HeavenBase-generated metadata stable without asking users to manage custom encoders.
compact=True with dumps_json or dump_json when a one-line JSON representation is required. JSONL helpers already use compact per-line JSON.
Callable JSON serialization is intentionally conservative. Do not treat callable objects as portable JSON data; durable callable metadata belongs in the Capsule and prompt surfaces rather than generic file helpers.

