Skip to content
You're viewing docs for v2.0. See the latest version →

pydantic.version

The version module holds the version information for Pydantic.

version_info

def version_info() -> str

Return complete version information for Pydantic and its dependencies.

Returns

str


parse_mypy_version

def parse_mypy_version(version: str) -> Tuple[int, ...]

Parse mypy string version to tuple of ints.

This function is included here rather than the mypy plugin file because the mypy plugin file cannot be imported outside a mypy run.

It parses normal version like 0.930 and dev version like 0.940+dev.04cac4b5d911c4f9529e6ce86a27b44f28846f5d.dirty.

Returns

Tuple[int, ...] — A tuple of ints. e.g. (0, 930).

Parameters

version : str

The mypy version string.


VERSION

The version of Pydantic.

Default: '2.0.3'