PackageContext

class PackageContext

Information about a package.

author_email

author_email: str = ''

A description for the distribution [Metadata]

author_name

author_name: str = ''

The author name of the distribution [Metadata]

authors

authors: dict[str, str] = dataclasses.field(default_factory=dict)

All authors of the distribution [Metadata]

build_system

build_system: buildsystems.BuildSystem = dataclasses.field(default_factory=lambda: buildsystems.hatch)

The build system set as build backend [pyproject]

classifier_map

classifier_map: dict[str, list[str]] = dataclasses.field(default_factory=dict)

Distribution classifiers, sorted by category [Metadata]

classifiers

classifiers: list[str] = dataclasses.field(default_factory=list)

Distribution classifiers [Metadata]

cli

cli: str | None = None

The cli package name used by the distribution.

cli_info

cli_info: clinspector.CommandInfo | None = None

An object containing information about all cli commands.

commit_types

commit_types: list[commitconventions.CommitTypeStr] = dataclasses.field(default_factory=list)

Commit types defined in pyproject mknodes section [pyproject]

configured_build_systems

configured_build_systems: list[Any] = dataclasses.field(default_factory=list)

A list of build systems which are configured in pyproject [pyproject]

description

description: str = ''

A description for the distribution [Metadata]

distribution_name

distribution_name: str = ''

The name of the distribution [Metadata]

docstring_style

docstring_style: str | None = None

The style used for DocStrings.

entry_points

entry_points: epregistry.ModuleEntryPointRegistry = dataclasses.field(default_factory=epregistry.ModuleEntryPointRegistry)

A dictionary containing the entry points of the distribution.

extras

extras: dict[str, folderinfo.PackageExtra] = dataclasses.field(default_factory=dict)

The extras of the distribution.

griffe_module

griffe_module: Module | Alias | None = None

The primary import package (griffe object).

homepage

homepage: str = ''

The main website of the distribution.

inventory_url

inventory_url: str | None = ''

A best guess for an inventory URL for the package.

keywords

keywords: list[str] = dataclasses.field(default_factory=list)

Distribution keywords [Metadata]

license_name

license_name: str | None = ''

Name of the license

license_text

license_text: str | None = ''

The complete license text

mkdocs_config

mkdocs_config: mkdocsconfigfile.MkDocsConfigFile | None = None

A dict-like File containing the MkDocs config.

module

module: types.ModuleType | None = None

The primary import package (module object).

package_name

package_name: str = ''

Name of the primary import package ([tool.mknodes] package, else the one matching the distribution name, else the first one).

package_names

package_names: list[str] = dataclasses.field(default_factory=list)

Names of all import packages (top-level modules) of the distribution, primary package first. See mknodes.info.projectlayout.

package_repos

package_repos: list[installmethods.InstallMethod] = dataclasses.field(default_factory=list)

Package repositories the distribution is distributed on. Defined in pyproject mknodes section [pyproject]

pretty_name

pretty_name: str = ''

A pretty name for the distribution (like MkNodes) [MkDocs site name]

pyproject_file

pyproject_file: pyproject.PyProject = dataclasses.field(default_factory=pyproject.PyProject.find)

A dict-like File containing the PyProject data.

repository_name

repository_name: str = ''

The repository name of the distribution.

repository_path

repository_path: pathlib.Path = dataclasses.field(default_factory=pathlib.Path)

The path to the local git repository.

repository_url

repository_url: str = ''

The URL to the remote code repository.

repository_username

repository_username: str = ''

The username for the remote code repository.

required_package_names

required_package_names: list[str] = dataclasses.field(default_factory=list)

The names of the dependencies.

required_packages

required_packages: dict[PackageInfo, Dependency] = dataclasses.field(default_factory=dict)

PackageInfos for the dependencies.

required_python_version

required_python_version: str | None = ''

The required python version for the distribution [Metadata]

social_info

social_info: list[dict[str, str]] = dataclasses.field(default_factory=list)

A icon-name -> URL dictionary containing .

summary

summary: str = ''

A summary for the distribution [Metadata]

task_runners

task_runners: list[Any] = dataclasses.field(default_factory=list)

Task runners used by the distribution.

tool_section

tool_section: superdict.SuperDict[Any] = dataclasses.field(default_factory=superdict.SuperDict)

The tool section of the pyproject file.

Comes as a SuperDict. (A Mutable mapping with extended capabilities) [pyproject]

tools

tools: list[tools.Tool] = dataclasses.field(default_factory=list)

A list of tools found for the distribution.

urls

urls: Mapping[str, str] = dataclasses.field(default_factory=dict)

A set of URLs related to the distribution.

version

version: str = ''

The version of the distribution [Metadata]

__init__

def __init__(package_name: str = '', package_names: list[str] = list(), module: types.ModuleType | None = None, griffe_module: Module | Alias | None = None, docstring_style: str | None = None, distribution_name: str = '', version: str = '', summary: str = '', description: str = '', author_name: str = '', author_email: str = '', authors: dict[str, str] = dict(), classifiers: list[str] = list(), classifier_map: dict[str, list[str]] = dict(), keywords: list[str] = list(), required_python_version: str | None = '', required_package_names: list[str] = list(), required_packages: dict[PackageInfo, Dependency] = dict(), extras: dict[str, folderinfo.PackageExtra] = dict(), urls: Mapping[str, str] = dict(), homepage: str = '', license_name: str | None = '', license_text: str | None = '', pretty_name: str = '', repository_url: str = '', repository_username: str = '', repository_name: str = '', repository_path: pathlib.Path = pathlib.Path(), mkdocs_config: mkdocsconfigfile.MkDocsConfigFile | None = None, pyproject_file: pyproject.PyProject = pyproject.PyProject.find(), tools: list[tools.Tool] = list(), task_runners: list[Any] = list(), social_info: list[dict[str, str]] = list(), inventory_url: str | None = '', entry_points: epregistry.ModuleEntryPointRegistry = epregistry.ModuleEntryPointRegistry(), cli: str | None = None, cli_info: clinspector.CommandInfo | None = None, build_system: buildsystems.BuildSystem = (lambda: buildsystems.hatch)(), configured_build_systems: list[Any] = list(), tool_section: superdict.SuperDict[Any] = superdict.SuperDict(), commit_types: list[commitconventions.CommitTypeStr] = list(), package_repos: list[installmethods.InstallMethod] = list()) -> None

__repr__

def __repr__() -> str
Page info
Resources
Resources(css=[],
          markdown_extensions={},
          plugins=[],
          js=[],
          assets=[],
          packages=[])
Metadata
created:
  source_filename: /home/runner/work/mknodes/mknodes/src/mknodes/manual/templating_section.py
  source_function: _
  source_line_no: 42
title: PackageContext