Harmont docs
Pipeline SDKReferenceToolchains

Python

Generated reference for the harmont Python API.

python

Callable singleton for the Python (uv) toolchain — access as hm.python.

Call directly to construct a PythonToolchain, or use the bare-form action methods (python.test(), python.lint(), etc.) for a one-shot leaf.

python(*, path='.', uv_version='latest', image=None, base=None) -> PythonToolchain
ParameterTypeDefaultDescription
pathstr'.'Path to the Python project root (must contain a
pyproject.toml).
uv_versionstr'latest'uv version to install. Use "latest" for the
latest release or a pinned version like "0.4.18".
imagestr | NoneNoneLocal-mode Docker base image override.
baseStep | NoneNoneExisting Step to attach to instead of emitting a fresh
apt-base step.

Returns PythonToolchain — A PythonToolchain whose installed step is uv sync.

python.fmt()

fmt(**kw) -> Step
ParameterTypeDefaultDescription
kwAny{}

Returns Step

python.lint()

lint(**kw) -> Step
ParameterTypeDefaultDescription
kwAny{}

Returns Step

python.test()

test(**kw) -> Step
ParameterTypeDefaultDescription
kwAny{}

Returns Step

python.typecheck()

typecheck(*, paths=None, **kw) -> Step
ParameterTypeDefaultDescription
pathsstr | list[str] | NoneNone
kwAny{}

Returns Step

PythonEntry

Callable singleton for the Python (uv) toolchain — access as hm.python.

Call directly to construct a PythonToolchain, or use the bare-form action methods (python.test(), python.lint(), etc.) for a one-shot leaf.

PythonEntry.fmt()

fmt(**kw) -> Step
ParameterTypeDefaultDescription
kwAny{}

Returns Step

PythonEntry.lint()

lint(**kw) -> Step
ParameterTypeDefaultDescription
kwAny{}

Returns Step

PythonEntry.test()

test(**kw) -> Step
ParameterTypeDefaultDescription
kwAny{}

Returns Step

PythonEntry.typecheck()

typecheck(*, paths=None, **kw) -> Step
ParameterTypeDefaultDescription
pathsstr | list[str] | NoneNone
kwAny{}

Returns Step

PythonToolchain

Python (uv) toolchain install chain — constructed via hm.python().

installed is the uv sync step. Action methods (test, lint, fmt, typecheck) attach leaves to installed so dependency installation is shared across CI actions.

Fields

FieldTypeDefault
pathstrrequired
installedSteprequired

PythonToolchain.fmt()

fmt(**kw) -> Step
ParameterTypeDefaultDescription
kwAny{}

Returns Step

PythonToolchain.lint()

lint(**kw) -> Step
ParameterTypeDefaultDescription
kwAny{}

Returns Step

PythonToolchain.test()

test(**kw) -> Step
ParameterTypeDefaultDescription
kwAny{}

Returns Step

PythonToolchain.typecheck()

typecheck(*, paths=None, **kw) -> Step
ParameterTypeDefaultDescription
pathsstr | list[str] | NoneNone
kwAny{}

Returns Step

On this page