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.40.tar.gz
(6.6 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.40.tar.gz.
File metadata
- Download URL: pl_run_program-0.0.40.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","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 |
0fac2d4cf00ab4a084c55a905b8d075d9dc03627f58b15451fcf6d9629703fc2
|
|
| MD5 |
00d139ab680abda60e3c13cc369530dc
|
|
| BLAKE2b-256 |
e5c2be0ad1a83a586479057f5bae9e18ea5453e02df9e9a10aeda3a8dca2de36
|
File details
Details for the file pl_run_program-0.0.40-py3-none-any.whl.
File metadata
- Download URL: pl_run_program-0.0.40-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","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 |
deefdf7d6952f60c7bd9267df9448962f3b120f07ef17d61e2b23d4291c91c7c
|
|
| MD5 |
5d917d9a3de790003f65d662a8e962a3
|
|
| BLAKE2b-256 |
fa83ca22f52197d462c66f74ab0285605ad8b4886d519dc2031e5cb51d1e0f77
|