luplo.config

Configuration loading from .luplo file, env vars, and CLI flags.

Priority (highest wins): CLI flag → env var → .luplo file → defaults.

Attributes

Classes

LuploConfig

Resolved configuration from all sources.

Functions

find_config_file(→ pathlib.Path | None)

Walk up from cwd looking for a .luplo file.

load_config(→ LuploConfig)

Load configuration with priority: env var → .luplo file → defaults.

write_config(→ None)

Write a .luplo config file.

Module Contents

luplo.config.CONFIG_FILENAME = '.luplo'
luplo.config.DEFAULT_DB_URL = 'postgresql://localhost/luplo'
luplo.config.DEFAULT_RESEARCH_TTL_DAYS = 90
class luplo.config.LuploConfig

Resolved configuration from all sources.

db_url: str = 'postgresql://localhost/luplo'
backend_type: str = 'local'
server_url: str = ''
project_id: str = ''
project_name: str = ''
actor_id: str = ''
actor_name: str = ''
actor_email: str = ''
research_ttl_days: int = 90
disabled_checks: tuple[str, Ellipsis] = ()
luplo.config.find_config_file() pathlib.Path | None

Walk up from cwd looking for a .luplo file.

luplo.config.load_config() LuploConfig

Load configuration with priority: env var → .luplo file → defaults.

CLI flags override at call time (not handled here).

luplo.config.write_config(path: pathlib.Path, *, db_url: str, project_id: str, project_name: str, actor_id: str, actor_name: str, actor_email: str = '', server_url: str = '', backend_type: str = 'local') None

Write a .luplo config file.