A simple interface for running non-python programs in python.
Project description
pl-run-program
A simple interface for running non-python programs in python.
Project Status
Alpha. Expect breaking changes.
Installation
uv add pl-run-program
Usage
from pl_run_program import run_program, run_simple_program, program_at_path
from pathlib import Path
# Paths are validated to ensure they're absolute, execuable, exist, etc.
echo_program = program_at_path(Path("/bin/echo"))
# run_program returns a ProgramResult object with stdout, stderr, and return code.
result = run_program(echo_program, ["Hello, World!"])
print(f"run_program result: {result}")
# run_simple_program is a convenience function that returns only stdout and raises an exception if the program returns a non-zero return code.
result = run_simple_program(echo_program, ["Hello, World!"])
print(f"run_simple_program result: {result}")
Releasing
Run ./release.sh.
License
Licensed under the Apache License 2.0. See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pl_run_program-0.0.18.tar.gz
(7.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pl_run_program-0.0.18.tar.gz.
File metadata
- Download URL: pl_run_program-0.0.18.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06afefe736e6b7796b369fb0b25ba18d2bef0cd8d2949f9f954ad8400a20c6ae
|
|
| MD5 |
bcb13d5a2daac32143be11f71abed89e
|
|
| BLAKE2b-256 |
510385a07bea5e649b0d6f60e3f5989d46498d767afbf1255f8030b4750e5b09
|
File details
Details for the file pl_run_program-0.0.18-py3-none-any.whl.
File metadata
- Download URL: pl_run_program-0.0.18-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c6255c2d0bdff1f547849637f69a142ec14000b3bb01bd3bcf69d7a3c623b19
|
|
| MD5 |
5fd4bf766fa9d8aa03a427efdf351bfb
|
|
| BLAKE2b-256 |
16a979d8f195ab707ef86f9b370ed2581256552c57eee9e1dabadd85a1698e88
|