skillfed

spython

Command line python tool for working with singularity.

spython v0.3.14 3.0M downloads/30d#2,780 on PyPI67
License unclear LICENSE Active released

What it is and what it does

spython is a Python wrapper around the Singularity container runtime, allowing you to build, run, and manage Singularity containers from Python scripts and applications. It provides a programmatic interface to Singularity operations that would otherwise require shell commands, making it useful for automation, CI/CD pipelines, and scientific workflows that need to orchestrate containerized workloads.

The package has no external Python dependencies, making installation lightweight. It requires Singularity > 3.5.2 to be installed on the host system and will not work with Singularity 2.x. The library is actively maintained, though releases are infrequent; the last release was in September 2024.

Use it for:

  • Automate Singularity container builds and execution within Python-based scientific workflows or batch processing systems.
  • Build CI/CD pipelines that programmatically manage container images without shell scripting.
  • Integrate container management into Python applications that need to spawn and monitor Singularity containers.
  • Orchestrate multi-container experiments in high-performance computing environments from Python code.
  • Wrap Singularity operations in Python libraries to provide a unified interface to containerized tools.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

spython is a Python API for programmatically managing Singularity containers, letting you build, run, and interact with container images from Python code.

Yes, if you need to programmatically manage Singularity containers from Python and have Singularity > 3.5.2 installed. The package has no Python dependencies, is actively maintained, and carries no known vulnerabilities. The main caveat is the unclear license classification—verify the LICENSE file before use in proprietary projects. The infrequent release cycle is typical for stable, mature tools.

Install

spython on PyPI

pip

pip install spython

uv

uv add spython

poetry

poetry add spython

Installing spython

Before you install

Installation is straightforward with no runtime dependencies. The package is actively maintained with a recent commit history, though the last release was nearly two years ago; the repository remains active and is not archived.

License in practice

The license treatment is unclear in the fact sheet; the raw LICENSE file is present but SPDX classification is not available. You should review the LICENSE file directly before adopting the package in a commercial or proprietary context.

Quickstart

pip install spython

from spython.main import Client

# Build a container from a recipe
Client.build('Singularity.def')

# Run a container
Client.run('mycontainer.sif', ['echo', 'hello'])

Requires Singularity > 3.5.2 to be installed on the system; Singularity 2.x is not supported.

Verify before relying

  • Whether the package works with modern Python versions (requires_python is unspecified in the fact sheet).
  • Current status of the project beyond the archived flag—whether active development is ongoing or maintenance-only.

Package facts

License LICENSE (unclear)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance actively maintained — 698 days since the last release
Last repo commit
First released
Downloads 3,029,271/month — #2,780 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: spython-0.3.14-py3-none-any.whl

Keywords: singularity, python, client, (spython)

Intended Audience :: DevelopersIntended Audience :: Science/ResearchOperating System :: UnixProgramming Language :: PythonProgramming Language :: Python :: 3Topic :: Scientific/EngineeringTopic :: Software Development

Tags

singularity container python apipython singularity clientcontainer management pythonsingularity python wrapperrun singularity from pythonsingularity cli pythoncontainer orchestration python
container-orchestrationsingularityhpc

More Software Development packages