Documentation Index
Fetch the complete documentation index at: https://ahvn.top/llms.txt
Use this file to discover all available pages before exploring further.
Common utilities are the small imports that many HeavenBase modules share: typing names, dataclasses, dict-path helpers, hashing, debug helpers, logs, proxy contexts, and color formatting.
1. Typing and dataclasses
HeavenBase exposes common typing and dataclass names fromheavenbase.utils for package code, demos, and small extensions that benefit from a compact import surface.
2. Dict paths
Usedget, dset, dunset, dsetdef, dmerge, dflat, and dunflat when you are working with nested config-like dictionaries.
dict.setdefault calls.
3. Hashing and debug output
Usemd5hash and sha256hash for deterministic local identifiers and integrity checks. md5hash(...) returns a zero-padded decimal string so it can be used directly with string identifier fields. Use md5int(...) or sha256int(...) when numeric modulo or ordering logic needs an integer digest.
capture_error(...) returns an ErrorRecord that keeps the original exception object and formatted text. Call record.reraise() when a diagnostic path needs to preserve the original exception rather than flatten it to a string.
4. Identifiers, names, and operation tokens
Use identifier helpers before user-provided names cross a backend boundary. They validate public names and convert workspace/entity IDs into backend-safe table and index names.class_name, field_name, kebab, snake, and clean_doc when generated names or documentation snippets need stable formatting. Use normalize_op, registered_ops, ops_for, and the OP_* constants when handler code needs to reason about query operation families.
5. Logging
Useget_logger for a colored HeavenBase logger. configure_logs(...) changes the global output behavior for all HeavenBase loggers that use this helper.
redirect_logs(path, loggers=[...]) to write selected loggers to a file, then call restore_logs(...) when the redirect should end. Passing a stream object to redirect_logs(...) routes all configured HeavenBase logger output to that stream.
6. Network proxy contexts
UseNetworkProxy when one operation needs temporary HTTP_PROXY, HTTPS_PROXY, or NO_PROXY environment variables. Existing values are restored when the context exits. Passing an empty string disables that proxy variable inside the context.
7. Color output
Color helpers use ANSI codes and respectNO_COLOR.

