Convenience helpers spanning the Styx runtime backends.
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file styxkit-0.1.0.tar.gz.
File metadata
- Download URL: styxkit-0.1.0.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e94f7334dcd714c4eb85425b9f9a0d827e46b3fc86d55b93391c92d5ff2331f
|
|
| MD5 |
bf59ea98126b5074c21d059f6a5a2411
|
|
| BLAKE2b-256 |
95cc699d3579d3deeddf9cc9984a9f09ca2a21ad79dd1bc52a84769916014964
|
File details
Details for the file styxkit-0.1.0-py3-none-any.whl.
File metadata
- Download URL: styxkit-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae55760dae6e74a0f2f7daedcebf4de54379a3af6cad9f1bd3b5c1e618cffecc
|
|
| MD5 |
92ff9535e854a77b97a6af858678e205
|
|
| BLAKE2b-256 |
652b07936775a725dc35249c4380d8589dc02552e545eac801a0585f8acadd79
|