jsonl-exec
Tiny structured-concurrency helpers for running a subprocess that emits JSON messages on stdout, reports text lines on stderr, and exposes stdout as a consumable async channel.
It intentionally does not parse provider-specific schemas or agent events. It just manages:
- process startup
- stdout JSON line parsing
- stderr callbacks
- async receive queue
- cancellation and process-tree cleanup
Example
from wm_jsonl_subprocess import JsonLineProcessOptions, open_json_line_process
async def main() -> None:
async with open_json_line_process(
JsonLineProcessOptions(
cmd="claude",
args=["-p", "Hello", "--output-format", "stream-json"],
on_stderr=print,
)
) as process:
while True:
message = await process.receive()
if message is None:
break
print(message)
Metadata
Release files for jsonl-exec 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 | |
|---|---|---|---|
| jsonl_exec-0.1.0.tar.gz | 3.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jsonl_exec-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.5 kB
Release files / jsonl_exec-0.1.0.tar.gz
| Download URL | jsonl_exec-0.1.0.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
82df1dd03e95a73bbb62146e71b2fbffb8e72c4e020ed7505152722e86a37b33
|
|
BLAKE2b-256 checksum How to use checksums |
136842c60c562857b2cf55470b0fbbcb6b9ca0f6715fd11971bebb77b4cb9da9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Release files / jsonl_exec-0.1.0-py3-none-any.whl
| Download URL | jsonl_exec-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b6c9024599e969287de80b24fae5f88b9f59c90a8f8a4ec5f251319f14c445f8
|
|
BLAKE2b-256 checksum How to use checksums |
4ac745283267476ada3e29d9f1aa692413ae545f8cccdc817470c5d9a43b497b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|