shpyx is a simple, lightweight and typed library for running shell commands in Python.
Documentation: shpyx.readthedocs.io
Installation
Install with uv or pip:
uv add shpyx
pip install shpyx
Quick start
Use shpyx.run to run a shell command in a subprocess:
>>> import shpyx
>>> shpyx.run("echo 1")
ShellCmdResult(cmd='echo 1', stdout='1\n', stderr='', all_output='1\n', return_code=0)
>>> shpyx.run("echo 1").return_code
0
>>> shpyx.run("echo 1").stdout
'1\n'
>>> shpyx.run("echo 1").stderr
''
Shell logic works when the command is a string, and a custom Runner sets defaults for every call:
>>> shpyx.run("seq 1 5 | grep '2'").stdout
'2\n'
>>> runner = shpyx.Runner(log_cmd=True)
>>> runner.run("echo 1")
Running: echo 1
ShellCmdResult(cmd='echo 1', stdout='1\n', stderr='', all_output='1\n', return_code=0)
See the documentation for more guides, every option, and the full API reference.
Contributing
Contributions are welcome!
See CONTRIBUTING.md for details.
License
shpyx is distributed under the terms of the MIT license.
Metadata
Release files for shpyx 1.0.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 | Provenance | Actions |
|---|---|---|---|---|
| shpyx-1.0.0.tar.gz | 117.9 kB | Without provenance | Details for shpyx-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| shpyx-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for shpyx-1.0.0-py3-none-any.whl |
Total release size: 129.5 kB
Release files / shpyx-1.0.0.tar.gz
| Download URL | shpyx-1.0.0.tar.gz |
|---|---|
| Size | 117.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
21a8ae5626ed8d22a781258a0ee83bebba37830ac642187191df0e1f668a8fec
|
|
BLAKE2b-256 checksum How to use checksums |
89a27e2d5d0c46c5216cde98c51a1c8c556acbb6f3972e6139b75e0b51054499
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","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":true}
|
Release files / shpyx-1.0.0-py3-none-any.whl
| Download URL | shpyx-1.0.0-py3-none-any.whl |
|---|---|
| Size | 11.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4cdc60c4616518a04d366ec3260979094c4bad48e17de029be56e895ddbf7ea0
|
|
BLAKE2b-256 checksum How to use checksums |
0b25763b99fd42e631dd64fc8380839ed95da0ad34a8c881232ccddbf8300880
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","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":true}
|
Security for shpyx 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.