pysh
A library of small functions that simplify scripting in python
Installation
pip install pysh
Usage
sh
Run a shell command and display the output:
sh("git status")
Capture the output of a shell command:
res = sh("git status", capture=True)
print(res.stdout)
cd
Change the current working directory:
cd("path/to/dir")
Change the current working directory temporarily:
with cd("path/to/dir"):
sh("git status")
env
Set an environment variable:
env(var="value")
Set an environment variable temporarily:
with env(PGPASSWORD="MyPassword", PGUSER="postgres"):
sh("createdb -h localhost -p 5432 -O postgres mydb")
which
Checks whether an executable/script/builtin is available:
git_is_installed = which("git")
Metadata
Release files for pysh 3.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pysh-3.3.1.tar.gz | 3.1 kB | Without provenance | Details for pysh-3.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pysh-3.3.1-py3-none-any.whl | Python 3 | none | any | Details for pysh-3.3.1-py3-none-any.whl |
Total release size: 6.2 kB
Release files / pysh-3.3.1.tar.gz
| Download URL | pysh-3.3.1.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e13f4ee9b5b16df1666434053903caba40aaad7f4ec50b00442ec1523aab9d70
|
|
BLAKE2b-256 checksum How to use checksums |
b18321df6f4f0ace0b88473325b5d0f965dabfdd13d61ca57af43f665b47bd91
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.2 CPython/3.11.3 Linux/6.0.19-4-MANJARO
|
Release files / pysh-3.3.1-py3-none-any.whl
| Download URL | pysh-3.3.1-py3-none-any.whl |
|---|---|
| Size | 3.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7350f825c0b8bbeb26d6dcced515718a3c34e2f6daea750d4714b9f7688f548a
|
|
BLAKE2b-256 checksum How to use checksums |
bb737d5dd3505f0d24a689a5226a13ae05f394023dc05d3b108590bc9bf5bfcc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.2 CPython/3.11.3 Linux/6.0.19-4-MANJARO
|
Security for pysh 3.3.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.