Get Version • AI Agent SDK

get_version: Get the version string from pyproject.toml.

get_version

Function

</div>

This function is defined in the _version module.

Get the version string from pyproject.toml.

Signature

python
def get_version() -> str

Returns

ResponseField str

Version string (e.g., “1.6.52”)

Exceptions

RuntimeError

If version cannot be found or parsed

Uses

  • Path
  • pyproject_path.exists
  • RuntimeError
  • pyproject_path.read_text
  • re.search
  • match.group
  • warnings.warn

Source

View on GitHub

praisonaiagents/_version.py at line 12