Registry / devops / spin
library0.18pypypiunverified

spin is a developer tool designed to simplify common tasks for scientific Python libraries, such as environment setup, testing, and documentation builds. It focuses on standardizing development workflows using `pyproject.toml`. Current version is 0.18, with releases occurring periodically to add features and fix bugs.

pip install spin
INSTALL
IMPORT
SIG · SPIN
S
spin
devopspythonv0.18
Install
1.8s avg
Import
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.18 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 19.3MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 1.8s · import 0.000s · 20MB
17MB installed
● package 17MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

run_spin
from spin.cmds import run_spin
from spin import run_spin

This quickstart demonstrates how to set up a minimal `spin` project (a `pyproject.toml` with a task) and then programmatically invoke a `spin` command using `subprocess`. While `spin` has a Python API (`spin.app.run_spin`), direct `subprocess` invocation is often more robust for quickstarts and automation, as `run_spin` can cause `sys.exit()`.

import os import subprocess import sys import tempfile from pathlib import Path # Create a temporary project directory to run spin in with tempfile.TemporaryDirectory() as tmpdir_name: project_path = Path(tmpdir_name) os.chdir(project_path) # Define a simple pyproject.toml with a 'hello' task pyproject_content = """ [project] name = "my-spin-project" version = "0.1.0" [tool.spin] tasks.hello = "echo Hello from spin!" """ (project_path / "pyproject.toml").write_text(pyproject_content) print(f"Temporary project created at: {project_path}") print("Attempting to run 'spin hello' via subprocess...") try: # Invoke spin using `python -m spin` to simulate CLI execution # and allow the Python script to continue after spin completes. result = subprocess.run([sys.executable, '-m', 'spin', 'hello'], capture_output=True, text=True, check=True) print("\n--- spin output ---") print(result.stdout.strip()) print("--- end spin output ---") assert "Hello from spin!" in result.stdout print("Quickstart successful: 'spin hello' task executed and verified.") except subprocess.CalledProcessError as e: print(f"Error running spin command (exit code {e.returncode}):") print(f"Stdout: {e.stdout}") print(f"Stderr: {e.stderr}") sys.exit(1) except Exception as e: print(f"An unexpected error occurred: {e}") sys.exit(1)
spin --version
Debug
Known issues
breakingSupport for `setup.py` was completely removed in version 0.16.0. All project configuration and `spin` task definitions must now reside in `pyproject.toml`.
fix
Migrate your project's build backend and metadata from `setup.py` to `pyproject.toml` (PEP 517/621). Ensure all `[tool.spin]` configurations are defined in `pyproject.toml`.
affects: >=0.16.0
breakingThe way arguments are passed to tasks changed significantly in version 0.10.0. Tasks now receive arguments as a list of strings directly, rather than a single concatenated string.
fix
Review any `spin` task definitions that process command-line arguments. Update the task implementation in `pyproject.toml` (e.g., in a script) to correctly parse or utilize a list of string arguments.
affects: >=0.10.0
gotchaBy default, `spin install` attempts to use `conda` for environment creation if a `conda` executable is found in the system's PATH. If `conda` is not available, it falls back to `pip`.
fix
If you require a specific environment manager, explicitly configure it in your `pyproject.toml` under `[tool.spin.install]`, for example, `manager = "pip"` or `manager = "conda"`. Ensure the chosen manager is installed and accessible.
affects: >=0.15.0
gotchaspin commands must be executed from the root directory of a project that contains a `pyproject.toml` file with a valid `[tool.spin]` section. Running `spin` from a subdirectory or without this configuration will lead to errors.
fix
Always change your current working directory to the project root before running any `spin` commands. Verify your `pyproject.toml` includes a `[tool.spin]` table with at least one defined task or configuration.
affects: all
Upgrade
Version history
0.18latest on PyPI · released Mar 29, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
25 hits · last 30 days
node
22
OpenAI (training)
1
Resources
spin — pip install spin · libregistry