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| Parameter | Type | Default | Description |
|---|---|---|---|
path | str | '.' | Path to the Python project root (must contain a |
pyproject.toml). | |||
uv_version | str | 'latest' | uv version to install. Use "latest" for the |
latest release or a pinned version like "0.4.18". | |||
image | str | None | None | Local-mode Docker base image override. |
base | Step | None | None | Existing 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| Parameter | Type | Default | Description |
|---|---|---|---|
kw | Any | {} | — |
Returns Step
python.lint()
lint(**kw) -> Step| Parameter | Type | Default | Description |
|---|---|---|---|
kw | Any | {} | — |
Returns Step
python.test()
test(**kw) -> Step| Parameter | Type | Default | Description |
|---|---|---|---|
kw | Any | {} | — |
Returns Step
python.typecheck()
typecheck(*, paths=None, **kw) -> Step| Parameter | Type | Default | Description |
|---|---|---|---|
paths | str | list[str] | None | None | — |
kw | Any | {} | — |
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| Parameter | Type | Default | Description |
|---|---|---|---|
kw | Any | {} | — |
Returns Step
PythonEntry.lint()
lint(**kw) -> Step| Parameter | Type | Default | Description |
|---|---|---|---|
kw | Any | {} | — |
Returns Step
PythonEntry.test()
test(**kw) -> Step| Parameter | Type | Default | Description |
|---|---|---|---|
kw | Any | {} | — |
Returns Step
PythonEntry.typecheck()
typecheck(*, paths=None, **kw) -> Step| Parameter | Type | Default | Description |
|---|---|---|---|
paths | str | list[str] | None | None | — |
kw | Any | {} | — |
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
| Field | Type | Default |
|---|---|---|
path | str | required |
installed | Step | required |
PythonToolchain.fmt()
fmt(**kw) -> Step| Parameter | Type | Default | Description |
|---|---|---|---|
kw | Any | {} | — |
Returns Step
PythonToolchain.lint()
lint(**kw) -> Step| Parameter | Type | Default | Description |
|---|---|---|---|
kw | Any | {} | — |
Returns Step
PythonToolchain.test()
test(**kw) -> Step| Parameter | Type | Default | Description |
|---|---|---|---|
kw | Any | {} | — |
Returns Step
PythonToolchain.typecheck()
typecheck(*, paths=None, **kw) -> Step| Parameter | Type | Default | Description |
|---|---|---|---|
paths | str | list[str] | None | None | — |
kw | Any | {} | — |
Returns Step