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

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.1
File Size Uploaded Provenance Actions
shpyx-1.0.1.tar.gz 120.3 kB Without provenance Details for shpyx-1.0.1.tar.gz

Built distribution (wheel)

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

Total release size: 132.0 kB

Release files / shpyx-1.0.1.tar.gz

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

Download URL shpyx-1.0.1-py3-none-any.whl
Size 11.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8fe8413e5f94109a626d787cd62c37b78631d675f12ffca643f1f973cabf2f03
BLAKE2b-256 checksum
How to use checksums
0cbec3f38688be17c2eb42bb204d5e87134a82423415058ec97aea35c84d3ea2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","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.1

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