Skip to main content

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


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.29.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pl_run_program-0.0.29-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file pl_run_program-0.0.29.tar.gz.

File metadata

  • Download URL: pl_run_program-0.0.29.tar.gz
  • Upload date:
  • Size: 6.6 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

Hashes for pl_run_program-0.0.29.tar.gz
Algorithm Hash digest
SHA256 240fc733d22772e7d0d02824a773bd2cb26fca2f7cf0832a93da04f03f7aecfc
MD5 582af6066c372d7f5cc4c652197b804c
BLAKE2b-256 8d4b1c9a3a9249c52beee13e167a8bed832d16464dae0831aebc5097056c2637

See more details on using hashes here.

File details

Details for the file pl_run_program-0.0.29-py3-none-any.whl.

File metadata

  • Download URL: pl_run_program-0.0.29-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

Hashes for pl_run_program-0.0.29-py3-none-any.whl
Algorithm Hash digest
SHA256 49b9315ea01fb6f595d50ca7d6c6f50fe34a6a9aaed5684884a0755180faa988
MD5 f50b99828504497ad8b1459e7ef2178b
BLAKE2b-256 2bd10be89326fdd259d27c56b8353f5284ad61dd3e5d534ca5724906fb0b8a70

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page