Skip to main content

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


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)

Uploaded Source

Built Distribution

pshlib-0.1.1-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

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

Hashes for pshlib-0.1.1.tar.gz
Algorithm Hash digest
SHA256 432938aaa5eb9139bb9692854f30d33ec3dee078fdab72ebe8c86a8d90b4f14a
MD5 32a7472851ee5d3550c5abdcdf2eb0ee
BLAKE2b-256 222bb89ddf566e824f6a3d1d8435ee5e86a459e19e3272a69419800ccccadbd7

See more details on using hashes here.

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

Hashes for pshlib-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c9f258439fe89d53c1bceb9a0eb4023765e79b40458c951a4f23f6788956f0e2
MD5 ffad55a19d5d42da676549163102757f
BLAKE2b-256 d1efdb883f61d3fc6db9fc6b96d7a57c3a65abe6b7c431126e1cbbacf0d8719b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page