pytoolconfig.sources.PyProject

class pytoolconfig.sources.PyProject(working_directory, tool, bases=None, recursive=True)

Source for pyproject.toml and pytool.toml files.

Can be extended to other toml files.

__init__(working_directory, tool, bases=None, recursive=True)

Initialize the TOML configuration.

Parameters:
  • working_directory – Working Directory

  • tool – name of your tool. Will read configuration from [tool.yourtool]

  • bases – Base files/folders to look for (besides pyproject.toml)

  • recursive – search recursively up the directory tree for the file.

Methods

__init__(working_directory, tool[, bases, ...])

Initialize the TOML configuration.

parse()

Parse the TOML file.

universalconfig()

Parse the file for the universal config object's fields.

Attributes

description

name

toml_dict

tool

file