Skip to content

cmem_client.models.python_package¤

Python package models.

DataIntegration can be extended with Python packages, which ship the plugins a workflow uses. The installed packages are the items of client.python_packages, keyed by their PyPI name.

Classes:

Attributes:

PipRequirementSpecifier¤

PipRequirementSpecifier = Annotated[str, Field(title='Pip Requirement Specifier', description="A pip requirement specifier as defined in PEP 440/508: a package name optionally followed by one or more comma-separated version constraints (e.g. 'requests', 'requests==2.27.1', 'requests>=2.0,<3.0').", pattern=_PIP_REQUIREMENT_PATTERN)]

PythonPackage¤

Bases: ReadRepositoryItem

Installed python package.

Represents a python package installed in Corporate Memory

Attributes:

  • name (PyPiIdentifier) – PyPI name of the package. This is the key of the repository.
  • version (str | None) – Installed version, or None if the deployment does not report one.

Functions:

  • get_id – Get the package identifier.

get_id¤

get_id()

Get the package identifier.

Returns:

  • str – The python pypi name which uniquely identifies this package.

model_config¤

model_config = ConfigDict(arbitrary_types_allowed=True, str_strip_whitespace=True, extra='forbid')

name¤

name: PyPiIdentifier

version¤

version: str | None = None

Comments