sh 2.2.1
pip install sh
Released:
Python subprocess replacement
Navigation
Verified details
These details have been verified by PyPIProject links
GitHub Statistics
Maintainers
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: MIT License (MIT)
- Author: Andrew Moffat
- Maintainer: Andrew Moffat
- Requires: Python <4.0, >=3.8.1
Classifiers
- Development Status
- Environment
- Intended Audience
- License
- Programming Language
- Topic
Project description
If you are migrating from 1.* to 2.*, please see MIGRATION.md
sh is a full-fledged subprocess replacement for Python 3.8 - 3.12, and PyPy that allows you to call any program as if it were a function:
from sh import ifconfig
print(ifconfig("eth0"))
sh is not a collection of system commands implemented in Python.
sh relies on various Unix system calls and only works on Unix-like operating systems - Linux, macOS, BSDs etc. Specifically, Windows is not supported.
Installation
$> pip install sh
Support
Andrew Moffat - author/maintainer
Erik Cederstrand - maintainer
Developers
Testing
Tests are run in a docker container against all supported Python versions. To run, make the following target:
$> make test
To run a single test:
$> make test='FunctionalTests.test_background' test_one
Coverage
First run all of the tests:
$> SH_TESTS_RUNNING=1 coverage run --source=sh -m pytest
This will aggregate a .coverage. You may then visualize the report with:
$> coverage report
Or generate visual html files with:
$> coverage html
Which will create ./htmlcov/index.html that you may open in a web browser.
Project details
Verified details
These details have been verified by PyPIProject links
GitHub Statistics
Maintainers
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: MIT License (MIT)
- Author: Andrew Moffat
- Maintainer: Andrew Moffat
- Requires: Python <4.0, >=3.8.1
Classifiers
- Development Status
- Environment
- Intended Audience
- License
- Programming Language
- Topic
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file sh-2.2.1.tar.gz
.
File metadata
- Download URL: sh-2.2.1.tar.gz
- Upload date:
- Size: 345.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 287021ae84183dea49787985e33797dda7fe769e4f95f2c94dff8e245ab4cb00 |
|
MD5 | d1bc1f56e6a99109fb0f589aba574cf2 |
|
BLAKE2b-256 | bd30abf254f7b56ba7bcae938767e3ee0f54d220d931a35a8721de350b76dec5 |
Provenance
The following attestation bundles were made for sh-2.2.1.tar.gz
:
Publisher:
main.yml
on amoffat/sh
-
Statement:
- Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
sh-2.2.1.tar.gz
- Subject digest:
287021ae84183dea49787985e33797dda7fe769e4f95f2c94dff8e245ab4cb00
- Sigstore transparency entry: 161258341
- Sigstore integration time:
- Permalink:
amoffat/sh@b36a6c4d3e80f41c267ce4fea13cf818d6b58885
- Branch / Tag:
refs/heads/master
- Owner: https://github.com/amoffat
- Access:
public
- Token Issuer:
https://token.actions.githubusercontent.com
- Runner Environment:
github-hosted
- Publication workflow:
main.yml@b36a6c4d3e80f41c267ce4fea13cf818d6b58885
- Trigger Event:
push
- Statement type:
File details
Details for the file sh-2.2.1-py3-none-any.whl
.
File metadata
- Download URL: sh-2.2.1-py3-none-any.whl
- Upload date:
- Size: 38.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7369c4ae13729d8ea100b5e93af1a8be528a008433428e38651c9f2b5b5fe2c |
|
MD5 | 6cd2f5a7290db998f3906759fcdd24c2 |
|
BLAKE2b-256 | 3d9a3fb455591ab32280ea9397e8cb02b167bf591428e89779a896f2998cfd56 |
Provenance
The following attestation bundles were made for sh-2.2.1-py3-none-any.whl
:
Publisher:
main.yml
on amoffat/sh
-
Statement:
- Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
sh-2.2.1-py3-none-any.whl
- Subject digest:
c7369c4ae13729d8ea100b5e93af1a8be528a008433428e38651c9f2b5b5fe2c
- Sigstore transparency entry: 161258342
- Sigstore integration time:
- Permalink:
amoffat/sh@b36a6c4d3e80f41c267ce4fea13cf818d6b58885
- Branch / Tag:
refs/heads/master
- Owner: https://github.com/amoffat
- Access:
public
- Token Issuer:
https://token.actions.githubusercontent.com
- Runner Environment:
github-hosted
- Publication workflow:
main.yml@b36a6c4d3e80f41c267ce4fea13cf818d6b58885
- Trigger Event:
push
- Statement type: