sh


Namesh JSON
Version 2.0.7 PyPI version JSON
download
home_pagehttps://sh.readthedocs.io/
SummaryPython subprocess replacement
upload_time2024-06-01 16:36:57
maintainerAndrew Moffat
docs_urlNone
authorAndrew Moffat
requires_python<4.0,>=3.8.1
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            .. image:: https://raw.githubusercontent.com/amoffat/sh/master/images/logo-230.png
    :target: https://amoffat.github.com/sh
    :alt: Logo

**If you are migrating from 1.* to 2.*, please see MIGRATION.md**

|

.. image:: https://img.shields.io/pypi/v/sh.svg?style=flat-square
    :target: https://pypi.python.org/pypi/sh
    :alt: Version
.. image:: https://img.shields.io/pypi/dm/sh.svg?style=flat-square
    :target: https://pypi.python.org/pypi/sh
    :alt: Downloads Status
.. image:: https://img.shields.io/pypi/pyversions/sh.svg?style=flat-square
    :target: https://pypi.python.org/pypi/sh
    :alt: Python Versions
.. image:: https://img.shields.io/coveralls/amoffat/sh.svg?style=flat-square
    :target: https://coveralls.io/r/amoffat/sh?branch=master
    :alt: Coverage Status

|

sh is a full-fledged subprocess replacement for Python 3.8 - 3.11, and PyPy
that allows you to call *any* program as if it were a function:

.. code:: python

    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.

`Complete documentation here <https://sh.readthedocs.io/>`_

Installation
============

::

    $> pip install sh

Support
=======
* `Andrew Moffat <https://github.com/amoffat>`_ - author/maintainer
* `Erik Cederstrand <https://github.com/ecederstrand>`_ - 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.


            

Raw data

            {
    "_id": null,
    "home_page": "https://sh.readthedocs.io/",
    "name": "sh",
    "maintainer": "Andrew Moffat",
    "docs_url": null,
    "requires_python": "<4.0,>=3.8.1",
    "maintainer_email": "arwmoffat@gmail.com",
    "keywords": null,
    "author": "Andrew Moffat",
    "author_email": "arwmoffat@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/14/7a/5148402146d360a6d15922814a3b065b52be3a5fe878a8834d3ce4e7d33f/sh-2.0.7.tar.gz",
    "platform": null,
    "description": ".. image:: https://raw.githubusercontent.com/amoffat/sh/master/images/logo-230.png\n    :target: https://amoffat.github.com/sh\n    :alt: Logo\n\n**If you are migrating from 1.* to 2.*, please see MIGRATION.md**\n\n|\n\n.. image:: https://img.shields.io/pypi/v/sh.svg?style=flat-square\n    :target: https://pypi.python.org/pypi/sh\n    :alt: Version\n.. image:: https://img.shields.io/pypi/dm/sh.svg?style=flat-square\n    :target: https://pypi.python.org/pypi/sh\n    :alt: Downloads Status\n.. image:: https://img.shields.io/pypi/pyversions/sh.svg?style=flat-square\n    :target: https://pypi.python.org/pypi/sh\n    :alt: Python Versions\n.. image:: https://img.shields.io/coveralls/amoffat/sh.svg?style=flat-square\n    :target: https://coveralls.io/r/amoffat/sh?branch=master\n    :alt: Coverage Status\n\n|\n\nsh is a full-fledged subprocess replacement for Python 3.8 - 3.11, and PyPy\nthat allows you to call *any* program as if it were a function:\n\n.. code:: python\n\n    from sh import ifconfig\n    print(ifconfig(\"eth0\"))\n\nsh is *not* a collection of system commands implemented in Python.\n\nsh relies on various Unix system calls and only works on Unix-like operating\nsystems - Linux, macOS, BSDs etc. Specifically, Windows is not supported.\n\n`Complete documentation here <https://sh.readthedocs.io/>`_\n\nInstallation\n============\n\n::\n\n    $> pip install sh\n\nSupport\n=======\n* `Andrew Moffat <https://github.com/amoffat>`_ - author/maintainer\n* `Erik Cederstrand <https://github.com/ecederstrand>`_ - maintainer\n\n\nDevelopers\n==========\n\nTesting\n-------\n\nTests are run in a docker container against all supported Python versions. To run, make the following target::\n\n    $> make test\n\nTo run a single test::\n\n    $> make test='FunctionalTests.test_background' test_one\n\nCoverage\n--------\n\nFirst run all of the tests::\n\n    $> SH_TESTS_RUNNING=1 coverage run --source=sh -m pytest\n\nThis will aggregate a ``.coverage``.  You may then visualize the report with::\n\n    $> coverage report\n\nOr generate visual html files with::\n\n    $> coverage html\n\nWhich will create ``./htmlcov/index.html`` that you may open in a web browser.\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python subprocess replacement",
    "version": "2.0.7",
    "project_urls": {
        "Documentation": "https://sh.readthedocs.io/",
        "Homepage": "https://sh.readthedocs.io/",
        "Repository": "https://github.com/amoffat/sh"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "15c279f9dea6fc544c0eb79ed5018a38860c52d597c4be66c2cf2029bea5b3fd",
                "md5": "21feea629be6d9f9cfef3df893c46393",
                "sha256": "2f2f79a65abd00696cf2e9ad26508cf8abb6dba5745f40255f1c0ded2876926d"
            },
            "downloads": -1,
            "filename": "sh-2.0.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "21feea629be6d9f9cfef3df893c46393",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8.1",
            "size": 38103,
            "upload_time": "2024-06-01T16:36:54",
            "upload_time_iso_8601": "2024-06-01T16:36:54.323956Z",
            "url": "https://files.pythonhosted.org/packages/15/c2/79f9dea6fc544c0eb79ed5018a38860c52d597c4be66c2cf2029bea5b3fd/sh-2.0.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "147a5148402146d360a6d15922814a3b065b52be3a5fe878a8834d3ce4e7d33f",
                "md5": "d6963ecb396045a3ff280baa1fefd79b",
                "sha256": "029d45198902bfb967391eccfd13a88d92f7cebd200411e93f99ebacc6afbb35"
            },
            "downloads": -1,
            "filename": "sh-2.0.7.tar.gz",
            "has_sig": false,
            "md5_digest": "d6963ecb396045a3ff280baa1fefd79b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.8.1",
            "size": 345477,
            "upload_time": "2024-06-01T16:36:57",
            "upload_time_iso_8601": "2024-06-01T16:36:57.145289Z",
            "url": "https://files.pythonhosted.org/packages/14/7a/5148402146d360a6d15922814a3b065b52be3a5fe878a8834d3ce4e7d33f/sh-2.0.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-01 16:36:57",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "amoffat",
    "github_project": "sh",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "tox": true,
    "lcname": "sh"
}
        
Elapsed time: 0.26418s