ConfigInit.project_dir

ConfigInit.project_dir#

ConfigInit.project_dir(base_file: str | None = None, project_path: str | None = None) str[source]#

Return the standard project config directory: <base>/.<package_name>.

Passing base_file=__file__ from the calling module gives a deterministic path regardless of the working directory.

Parameters:
  • base_file – path to a file whose directory is used as the base (e.g. __file__ from the calling module). Takes precedence over project_path.

  • project_path – explicit base directory. Defaults to the current working directory if neither argument is given.