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

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.4
File Size Uploaded Provenance Actions
shpyx-1.0.4.tar.gz 125.7 kB Without provenance Details for shpyx-1.0.4.tar.gz

Built distribution (wheel)

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

Total release size: 138.5 kB

Release files / shpyx-1.0.4.tar.gz

Download URL shpyx-1.0.4.tar.gz
Size 125.7 kB
Tags Source
SHA-256 checksum
How to use checksums
da0111a41997abe99e800e5397dbbe283360faedc407289c21020f9f07a4ae77
BLAKE2b-256 checksum
How to use checksums
e887c6ab72a83f549c71b63112c0b1e9b382a063293cd9a11eba6a0120ce7c7c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","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.4-py3-none-any.whl

Download URL shpyx-1.0.4-py3-none-any.whl
Size 12.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b8704e91b9db47c75529a65819bd6fac69dc3b2a8a60f71c2341aadb665f8f3d
BLAKE2b-256 checksum
How to use checksums
0220182ec6e3d9f654c19ad533fc529a6ba7da0b83ed2e2ce24cc06b52cd3de5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","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.4

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