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.0
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.0.tar.gz | 14.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| commandport-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 31.0 kB
Release files / commandport-0.1.0.tar.gz
| Download URL | commandport-0.1.0.tar.gz |
|---|---|
| Size | 14.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
403e052ee309ecd1bfcdac16216c6201faca6ff871936cc529dbd3d6cf3622db
|
|
BLAKE2b-256 checksum How to use checksums |
4b8f3a929b627aebf2a9aab79627896e9ffeb4aac3e116121869bb1eb2fd5066
|
| 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.0-py3-none-any.whl
| Download URL | commandport-0.1.0-py3-none-any.whl |
|---|---|
| Size | 16.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c9a09f1c2e36579580ecdb80a07c3862c8ef639e60b43f10e1a9da9260478234
|
|
BLAKE2b-256 checksum How to use checksums |
2a384b730f1b3ed93c50238433b899953afd480a20709e77099c5f16d192bb93
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|