sh


Namesh JSON
Version 2.0.6 PyPI version JSON
download
home_pagehttps://sh.readthedocs.io/
SummaryPython subprocess replacement
upload_time2023-08-10 01:31:30
maintainerAndrew Moffat
docs_urlNone
authorAndrew Moffat
requires_python>=3.8.1,<4.0
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": ">=3.8.1,<4.0",
    "maintainer_email": "arwmoffat@gmail.com",
    "keywords": "",
    "author": "Andrew Moffat",
    "author_email": "arwmoffat@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/cd/51/7355831d8e1cee8348157d769ccda8a31ca9fa0548e7f93d87837d83866d/sh-2.0.6.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.6",
    "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": "53089de3e477ad2fd432e78ce351341686d1bbec346976b22c7cc5f81f1ff15a",
                "md5": "b320868115814cdf372904feabe813e4",
                "sha256": "ced8f2e081a858b66a46ace3703dec243779abbd5a1887ba7e3c34f34da70cd2"
            },
            "downloads": -1,
            "filename": "sh-2.0.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b320868115814cdf372904feabe813e4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8.1,<4.0",
            "size": 38120,
            "upload_time": "2023-08-10T01:31:28",
            "upload_time_iso_8601": "2023-08-10T01:31:28.885199Z",
            "url": "https://files.pythonhosted.org/packages/53/08/9de3e477ad2fd432e78ce351341686d1bbec346976b22c7cc5f81f1ff15a/sh-2.0.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cd517355831d8e1cee8348157d769ccda8a31ca9fa0548e7f93d87837d83866d",
                "md5": "aadf37759a9cb4862257cef3cf44a27b",
                "sha256": "9b2998f313f201c777e2c0061f0b1367497097ef13388595be147e2a00bf7ba1"
            },
            "downloads": -1,
            "filename": "sh-2.0.6.tar.gz",
            "has_sig": false,
            "md5_digest": "aadf37759a9cb4862257cef3cf44a27b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8.1,<4.0",
            "size": 345496,
            "upload_time": "2023-08-10T01:31:30",
            "upload_time_iso_8601": "2023-08-10T01:31:30.082483Z",
            "url": "https://files.pythonhosted.org/packages/cd/51/7355831d8e1cee8348157d769ccda8a31ca9fa0548e7f93d87837d83866d/sh-2.0.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-10 01:31:30",
    "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.10093s