Registry / devops / prerun

prerun

JSON →
library1.1.3pypypi✓ verified 86d ago

Prerun is a Python utility to run commands before another process starts, commonly used for environment setup, health checks, or dependency injection. Current version 1.1.3, released 2024, with occasional updates.

pip install prerun
INSTALL
IMPORT
SIG · PRERUN
P
prerun
devopspythonv1.1.3
Install
1.9s avg
Import
119ms
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.1.3 · 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.95 runs
installs and imports cleanly · install 0.0s · import 0.132s · 18.6MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.9s · import 0.106s · 19MB
17MB installed
● package 17MB
Code
Verified usage

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

prerun
import prerun
Direct import of top-level module; no subpackages needed.

Basic usage: prerun.run() executes a command sequentially before continuing.

import prerun # Define a command to run before the main process prerun.run(['echo', 'Pre-run setup complete']) # Main process continues after prerun completes print('Main process starting')
prerun --version
Debug
Known issues
gotchaprerun.run() blocks until the command finishes. Do not use for background tasks.
fix
Use threading or subprocess.Popen for async execution.
affects: all
deprecatedThe 'cwd' parameter in prerun.run() is deprecated since 1.1.0; use 'subprocess.Popen' with cwd instead.
fix
Replace with subprocess.Popen(command, cwd=path) if you need a working directory.
affects: >=1.1.0
Errors
Common errors & fixes
AttributeError: module 'prerun' has no attribute 'run'
Older prerun versions (<1.0.0) used a different API or the module was installed incorrectly.
fix
Upgrade: pip install --upgrade prerun. Ensure you have v1.0.0+.
FileNotFoundError: [Errno 2] No such file or directory: '...'
Passing a non-executable string or missing command. prerun.run() expects a command that is in PATH or a full path.
fix
Use a full path or check that the command exists: prerun.run(['/usr/bin/echo', 'test']).
Upgrade
Version history
1.1.3latest on PyPI · released Sep 6, 2024
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
prerun — pip install prerun · libregistry