Skip to content

debug ¤

Debugging utilities.

Classes:

  • Environment

    Dataclass to store environment information.

  • Package

    Dataclass describing a Python package.

  • Variable

    Dataclass describing an environment variable.

Functions:

Environment dataclass ¤

Environment(
    interpreter_name: str,
    interpreter_version: str,
    interpreter_path: str,
    platform: str,
    packages: list[Package],
    variables: list[Variable],
)

Dataclass to store environment information.

Attributes:

interpreter_name instance-attribute ¤

interpreter_name: str

Python interpreter name.

interpreter_path instance-attribute ¤

interpreter_path: str

Path to Python executable.

interpreter_version instance-attribute ¤

interpreter_version: str

Python interpreter version.

packages instance-attribute ¤

packages: list[Package]

Installed packages.

platform instance-attribute ¤

platform: str

Operating System.

variables instance-attribute ¤

variables: list[Variable]

Environment variables.

Package dataclass ¤

Package(name: str, version: str)

Dataclass describing a Python package.

Attributes:

name instance-attribute ¤

name: str

Package name.

version instance-attribute ¤

version: str

Package version.

Variable dataclass ¤

Variable(name: str, value: str)

Dataclass describing an environment variable.

Attributes:

name instance-attribute ¤

name: str

Variable name.

value instance-attribute ¤

value: str

Variable value.

get_debug_info ¤

get_debug_info() -> Environment

Get debug/environment information.

Returns:

get_version ¤

get_version(dist: str = 'griffe-docfx') -> str

Get version of the given distribution.

Parameters:

  • dist (str, default: 'griffe-docfx' ) –

    A distribution name.

Returns:

  • str

    A version number.

print_debug_info ¤

print_debug_info() -> None

Print debug/environment information.