Skip to main content

Module paths

Module paths 

Source
Expand description

Cross-platform resolution for the persistent-database default path.

The persistent database lives in the platform-standard data directory:

  • macOS: ~/Library/Application Support/hyperdb/workspace.hyper
  • Linux: $XDG_DATA_HOME/hyperdb/workspace.hyper (defaults to ~/.local/share/hyperdb/workspace.hyper)
  • Windows: %APPDATA%\hyperdb\workspace.hyper

Note this is intentionally distinct from ~/.hyperdb/, which is the daemon’s state directory (daemon.json, logs/). Daemon coordination and user data have different lifecycles, so they live in different places.

Resolution precedence:

  1. Explicit CLI value (--persistent-db <PATH> or the deprecated --workspace <PATH>).
  2. HYPERDB_PERSISTENT_DB environment variable.
  3. Platform default via dirs::data_dir.

Constants§

ENV_PERSISTENT_DB
Environment variable that overrides the platform-default path.

Functions§

default_persistent_db_path
Returns the platform-default path for the persistent database. Returns None if the home / data directory cannot be determined (rare; usually indicates a misconfigured environment).
resolve_persistent_db_path
Resolve where the persistent database should live, applying the CLI > env-var > platform-default precedence. Returns None only when no source supplied a path (the platform default failed and nothing was set explicitly), which the caller should treat as an error.