Skip to main content

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:

  • 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

styxkit-0.1.0.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

styxkit-0.1.0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

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

Hashes for styxkit-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5e94f7334dcd714c4eb85425b9f9a0d827e46b3fc86d55b93391c92d5ff2331f
MD5 bf59ea98126b5074c21d059f6a5a2411
BLAKE2b-256 95cc699d3579d3deeddf9cc9984a9f09ca2a21ad79dd1bc52a84769916014964

See more details on using hashes here.

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

Hashes for styxkit-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ae55760dae6e74a0f2f7daedcebf4de54379a3af6cad9f1bd3b5c1e618cffecc
MD5 92ff9535e854a77b97a6af858678e205
BLAKE2b-256 652b07936775a725dc35249c4380d8589dc02552e545eac801a0585f8acadd79

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page