lifecycle-runner
Run a local command to completion. Three operations over one contract (commandport):
from commandport.domain import CaptureSpec, RunSpec, StreamSpec
from lifecycle_runner.api import capture, run, stream
done = capture(CaptureSpec(("git", "rev-parse", "HEAD"), timeout_seconds=15))
if done.ok:
print(done.stdout.strip())
for line in stream(StreamSpec(("pytest", "-q"), timeout_seconds=600)): # a LineStream
print(line, end="")
run(RunSpec(("make", "build"), inherit_stdio=True)) # attached to this console, or windowless without one
Also a scheduler-task entry point: python -m lifecycle_runner --log run.log --timeout 1800 -- cmd args....
Tests: lifecycle_runner.api.use_commands(commandport.testing.FakeCommandRunner()).
It depends on proclaunch only for the one definition of "no console window" and the process-tree kill.
Metadata
Release files for lifecycle-runner 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| lifecycle_runner-0.1.1.tar.gz | 12.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lifecycle_runner-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 28.2 kB
Release files / lifecycle_runner-0.1.1.tar.gz
| Download URL | lifecycle_runner-0.1.1.tar.gz |
|---|---|
| Size | 12.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ae66ede067c7055319467e19aedeaf166916f7e26488c9fb24aa8d013e722d46
|
|
BLAKE2b-256 checksum How to use checksums |
29777c645193231ccf84f72c956985e5d3fa90f113e5e6510ee0c008a6c4d471
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Release files / lifecycle_runner-0.1.1-py3-none-any.whl
| Download URL | lifecycle_runner-0.1.1-py3-none-any.whl |
|---|---|
| Size | 15.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a170339ca61e49b7c66f201a6ad9171cebbc33c7c004845e62abcaf8485474b1
|
|
BLAKE2b-256 checksum How to use checksums |
c9ae4bd44f744716f612d864c208e578474a06a9dbc427a3909d374069097090
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|