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

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.3
File Size Uploaded Provenance Actions
shpyx-1.0.3.tar.gz 123.1 kB Without provenance Details for shpyx-1.0.3.tar.gz

Built distribution (wheel)

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

Total release size: 135.5 kB

Release files / shpyx-1.0.3.tar.gz

Download URL shpyx-1.0.3.tar.gz
Size 123.1 kB
Tags Source
SHA-256 checksum
How to use checksums
d800a49f4f54241914456cb17a4f0524a750dcc987aa137de433a5b96a38d3d3
BLAKE2b-256 checksum
How to use checksums
5b6d4bb2e35d1153766bc30490e408359c3133114d02e251c520d9526819bf7f
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.3-py3-none-any.whl

Download URL shpyx-1.0.3-py3-none-any.whl
Size 12.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
79003bcd187fe9205c16931f91690ae07594cd4ed1f334a9b0c2e4160c8e9263
BLAKE2b-256 checksum
How to use checksums
fc8c6330d065e9438b2c8501eeee43c903609dc2472b54927933d42f525cf176
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.3

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