Causal embedding of shell commands into python code.
Project description
pshlib
Causal embedding of shell commands into python code.
Example
You can break single long bash lines into nested python like multi-line statements:
res = psh(
'VAR=world',
"""
echo This is
a multiline hello
$VAR!
""",
).output
print(res)
excepted = 'This is a multiline hello world!\n'
assert excepted == res
Installation
with pip:
pip install pshlib
with poetry:
poetry add git+https://gitlab.com:ewiger/pshlib.git
License
Licensed under MIT. See LICENSE for details.
Publish
poetry publish --build
Project details
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
pshlib-0.1.1.tar.gz
(4.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pshlib-0.1.1.tar.gz.
File metadata
- Download URL: pshlib-0.1.1.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.0 CPython/3.9.5 Darwin/21.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
432938aaa5eb9139bb9692854f30d33ec3dee078fdab72ebe8c86a8d90b4f14a
|
|
| MD5 |
32a7472851ee5d3550c5abdcdf2eb0ee
|
|
| BLAKE2b-256 |
222bb89ddf566e824f6a3d1d8435ee5e86a459e19e3272a69419800ccccadbd7
|
File details
Details for the file pshlib-0.1.1-py3-none-any.whl.
File metadata
- Download URL: pshlib-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.0 CPython/3.9.5 Darwin/21.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c9f258439fe89d53c1bceb9a0eb4023765e79b40458c951a4f23f6788956f0e2
|
|
| MD5 |
ffad55a19d5d42da676549163102757f
|
|
| BLAKE2b-256 |
d1efdb883f61d3fc6db9fc6b96d7a57c3a65abe6b7c431126e1cbbacf0d8719b
|