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.0.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file pshlib-0.1.0.tar.gz.

File metadata

  • Download URL: pshlib-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 4459091bd7c2838fafce5d3692c188889e513502f62daca7220610d7737e08ce
MD5 32700ae38ff72dada4a6ef62bcd07ee4
BLAKE2b-256 1226a3362fabd96e5042c403954eae090300247d60a504844d1ba2b8b26db9e6

See more details on using hashes here.

File details

Details for the file pshlib-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pshlib-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 00ee6b5a4c56a6d3c0a24c13d7429434843f6582b104fcbcdbba7285a2f55585
MD5 5d5f1997991da1924eecda5147e8ee11
BLAKE2b-256 ce7e58dcdbaa99c1fb41979d97f456bc3c353f9edccce1cf8571c60e22b0c01e

See more details on using hashes here.

Supported by

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