commandport
The contract between an application and "something that runs a process", and the check that keeps it that way. Standard library only; it imports no process, file or network module, so an application's core can depend on it.
- Types (
commandport.domain):CaptureSpec/RunSpec/StreamSpec,ProcessSpec, their results with an explicitRunOutcome/LaunchMethod. - Ports (
commandport.ports):CommandCapturer,CommandStreamer,CommandRunner,LineStream,BackgroundLauncher,Supervisor. A use case takes one as an argument; an entrypoint chooses the implementation. - Fakes (
commandport.testing):FakeCommandRunner,FakeLauncher,FakeSupervisors: in-memory, no patching. - Scan (
commandport.scan): fails when code reaches forsubprocess/os.system/ ... outside the adapters. Configure it inpyproject.tomlunder[tool.commandport], runpython -m commandport.scan, or callcommandport.scan.assert_clean()from a test.
Implementations: lifecycle-runner (run / capture / stream) and
proclaunch (detached services). Install launch-runner to get all three.
Guarantees every implementation of the contract gives: it never raises (a failure is a result with an outcome), never opens a console window on Windows, decodes text as UTF-8, closes stdin unless text is supplied, and on a timeout kills the whole process tree and reports what was printed so far.
Metadata
Release files for commandport 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 | |
|---|---|---|---|
| commandport-0.1.1.tar.gz | 14.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| commandport-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 31.0 kB
Release files / commandport-0.1.1.tar.gz
| Download URL | commandport-0.1.1.tar.gz |
|---|---|
| Size | 14.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b78fd924b89e8e76c3dad247c5ee206c81933b6460b9047ea0f47175669b01b2
|
|
BLAKE2b-256 checksum How to use checksums |
c0cc91bb182e933f10c45e936a6939d878e2f4d4b9475314691633d58be9b58f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Release files / commandport-0.1.1-py3-none-any.whl
| Download URL | commandport-0.1.1-py3-none-any.whl |
|---|---|
| Size | 16.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ddb8d81bf3b16d742da9c28b093eca166812bd42af94d52a7e43360155a3f3ab
|
|
BLAKE2b-256 checksum How to use checksums |
65568be2ef86a0c68130585a5423d2bc7e9a1826b1d925f4d4bb905cb6ba699f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|