Skip to main content

image image image Documentation

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.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for shpyx 1.0.2
File Size Uploaded Provenance Actions
shpyx-1.0.2.tar.gz 121.5 kB Without provenance Details for shpyx-1.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for shpyx 1.0.2
File Interpreter ABI Platform Actions
shpyx-1.0.2-py3-none-any.whl Python 3 none any Details for shpyx-1.0.2-py3-none-any.whl

Total release size: 133.2 kB

Release files / shpyx-1.0.2.tar.gz

Download URL shpyx-1.0.2.tar.gz
Size 121.5 kB
Tags Source
SHA-256 checksum
How to use checksums
9d47da5699ed5a824179a6fa746a6c89fc36819fafd85c061e9bf897d52ae86b
BLAKE2b-256 checksum
How to use checksums
9bc624b45e25561d9466e8000bc3dfa2e66185474cf65e89ba6d2d91f58e288f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","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.2-py3-none-any.whl

Download URL shpyx-1.0.2-py3-none-any.whl
Size 11.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0565cba2cbfc2e92e75a491c02526db0421fbe3ecd5dd15399dffe0a6d19ced8
BLAKE2b-256 checksum
How to use checksums
d453a9d17a807c699624760643c695dbf34fce58f68f82ba28c0fe49469b609b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","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.2

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.

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page