yera.locations
Shared filesystem location primitives for config, credentials, and CLI.
Symbols
discover_pyproject
discover_pyproject(
require_tool_yera: bool = False,
) → Path | NoneFind the nearest pyproject.toml walking up from CWD, stopping at .git.
If require_tool_yera=True, only return files that contain [tool.yera]. Returns None when no qualifying file is found.
Parameters
Whether the file must contain a [tool.yera]
table.
Returns
The nearest qualifying pyproject.toml, or None.
resolve_project_root
resolve_project_root() → Path | NoneReturn the directory containing the nearest pyproject.toml.
Uses require_tool_yera=False — accepts any pyproject.toml. Used by credential authorisation to establish the authoritative project root, independently of whether the project has configured Yera yet.
Returns
The nearest project directory, or None when none can be resolved.
yera_home_dir
yera_home_dir() → PathReturn the Yera user data directory.
Default: ~/.yera/ Override: YERA_HOME environment variable.
Returns
The configured or default Yera user-data directory.