yera.config.storage.read

TOML reading helpers for config.

Symbols

def read_pyproject_yera — Read the pyproject.toml discovered for read and return [tool.yera] only.
def read_pyproject_yera_apps_dir — Return the resolved apps directory from ``[tool.yera] apps_dir``, or None.
def read_pyproject_yera_hub — Read the ``hub`` key from ``[tool.yera]`` in the discovered ``pyproject.toml``.
def read_toml_at_path — Read a TOML file into a dict, returning {} when missing.
def read_yera_toml — Read yera.toml using the resolved config path.

read_pyproject_yera

read_pyproject_yera() → dict[str, TomlValue]

Read the pyproject.toml discovered for read and return [tool.yera] only.

read_pyproject_yera_apps_dir

read_pyproject_yera_apps_dir() → Path | None

Return the resolved apps directory from [tool.yera] apps_dir, or None.

The path is resolved relative to the directory containing the discovered pyproject.toml, not relative to cwd. Returns None when the key is absent, the value is not a string, or no qualifying pyproject.toml is found.

read_pyproject_yera_hub

read_pyproject_yera_hub() → str | None

Read the hub key from [tool.yera] in the discovered pyproject.toml.

read_toml_at_path

read_toml_at_path(
    path: Path,
) → dict[str, TomlValue]

Read a TOML file into a dict, returning {} when missing.

read_yera_toml

read_yera_toml() → dict[str, TomlValue]

Read yera.toml using the resolved config path.