Skip to main content

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:

  • styxdefs is the base contract (the Runner protocol, LocalRunner, DryRunner, and set_global_runner / get_global_runner).
  • Each backend (styxdocker, styxpodman, styxsingularity, styxgraph) is an independent package depending only on styxdefs.
  • styxkit depends only on styxdefs and 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 (from styxdefs).
  • 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 styxdefs symbols (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)

Source distribution for styxkit 0.1.0
File Size Uploaded
styxkit-0.1.0.tar.gz 4.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for styxkit 0.1.0
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page