friendly_dist_manager.pyproject.parser module

Primitives for operating on pyproject.toml files

class friendly_dist_manager.pyproject.parser.PyProjectParser(toml_data)[source]

Bases: object

Interface for parsing and manipulating data stored in a TOML formatted

configuration file

Each section, or table, within the TOML configuration file is defined by it’s own independent PEP standard. As such this primary entry point defers the handling of specific tables to supporting classes.

References

Parameters

toml_data (str) – Raw text loaded from a TOML formatted configuration file

property build_system

returns the ‘build-system’ table from the config file

Type

BuildSystemTable

classmethod from_file(file_path)[source]

Factory method used to instantiate instances of this class from a disk-based file

Parameters

file_path (pathlib.Path) – path to the TOML file to load

Returns

reference to the class instance created

Return type

PyProjectParser

property project

returns the ‘project’ table from the config file

Type

ProjectTable