Skip to content

pyproject.py

Pyproject dataclass

Bases: TOMLInput

IO for loading a pyproject.toml section.

Example usage:

>>> from pathlib import Path
>>> from ordeq_pyproject import Pyproject
>>> pyproject = Pyproject(
...     path=Path("pyproject.toml"), section="tool.my_tool"
... )
>>> data = pyproject.load() # doctest: +SKIP

load(**load_options)

Load the specified section from the pyproject.toml file.

Parameters:

Name Type Description Default
**load_options Any

Additional options to pass to the TOML loader.

{}

Returns:

Type Description
Any

A dictionary representing the contents of the specified section in the pyproject.toml file.