Styxkit - convenience helpers for the Styx runtime
styxkit is a small convenience layer on top of the Styx runtime. It provides
one-call runner selection across whichever backend packages you have installed,
so you do not have to import each runner class and wire up the global runner by
hand.
It sits at the top of the runtime stack:
styxdefsis the base contract (theRunnerprotocol,LocalRunner,DryRunner, andset_global_runner/get_global_runner).- Each backend (
styxdocker,styxpodman,styxsingularity,styxgraph) is an independent package depending only onstyxdefs. styxkitdepends only onstyxdefsand imports the backends lazily, so installing it does not pull in any container backend you do not want.
Installation
pip install styxkit # base, plus styxdefs
pip install "styxkit[docker]" # + the Docker backend
pip install "styxkit[all]" # + every backend (docker, podman, singularity, graph)
Calling a use_*() for a backend you have not installed raises a friendly error
telling you exactly what to install.
Usage
import styxkit
# Pick a specific runner:
styxkit.use_docker()
styxkit.use_singularity(singularity_executable="apptainer")
styxkit.use_local()
# ...or let styxkit detect the best available container runtime,
# falling back to local when none is found:
runner = styxkit.use_auto()
# Each use_*() registers the runner as the global runner and returns it,
# so you can configure it without a get_global_runner() round-trip:
runner = styxkit.use_docker()
runner.data_dir = "/tmp/styx"
use_auto() prefers, in order, the first container backend that is both
installed and has its executable on PATH: Docker, then Podman, then
Singularity/Apptainer, otherwise the local runner.
Available helpers
use_local,use_dry- always available (fromstyxdefs).use_docker,use_podman,use_singularity- lazy, require the matching backend.use_graph(base=None)- wraps a runner in a graph recorder; defaults to the current global runner.use_auto()/resolve_runner()- detect and select a runner.- The core
styxdefssymbols (Runner,Execution,Metadata,set_global_runner, ...) are re-exported for convenience.
License
styxkit is released under the MIT License. See the LICENSE file for details.
Metadata
Release files for styxkit 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| styxkit-0.1.0.tar.gz | 4.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| styxkit-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.1 kB
Release files / styxkit-0.1.0.tar.gz
| Download URL | styxkit-0.1.0.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5e94f7334dcd714c4eb85425b9f9a0d827e46b3fc86d55b93391c92d5ff2331f
|
|
BLAKE2b-256 checksum How to use checksums |
95cc699d3579d3deeddf9cc9984a9f09ca2a21ad79dd1bc52a84769916014964
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / styxkit-0.1.0-py3-none-any.whl
| Download URL | styxkit-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ae55760dae6e74a0f2f7daedcebf4de54379a3af6cad9f1bd3b5c1e618cffecc
|
|
BLAKE2b-256 checksum How to use checksums |
652b07936775a725dc35249c4380d8589dc02552e545eac801a0585f8acadd79
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|