pypirun


Namepypirun JSON
Version 3.0.966010 PyPI version JSON
download
home_pagehttps://github.com/yahoo/pypirun
SummaryCommand line utility to run a command, installing needed python packages if it is not installed
upload_time2024-11-08 00:31:18
maintainerNone
docs_urlNone
authorVerizon Media Python Platform Team
requires_python>=3.9
licenseBSD License
keywords python virtualenv pypi cli
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            # pypirun

[![Build Status](https://cd.screwdriver.cd/pipelines/2852/badge)](https://cd.screwdriver.cd/pipelines/2852)
[![Codestyle](https://img.shields.io/badge/code%20style-pep8-lightgrey.svg)](https://www.python.org/dev/peps/pep-0008/)
[![Code Coverage](https://codecov.io/gh/yahoo/pypirun/branch/master/graph/badge.svg)](https://codecov.io/gh/yahoo/pypirun)
[![Wheel](https://img.shields.io/pypi/wheel/pypirun.svg)](https://pypi.org/project/pypirun/)
[![Version](https://img.shields.io/pypi/v/pypirun.svg)](https://pypi.org/project/pypirun/)
[![Downloads](https://pepy.tech/badge/pypirun)](https://pepy.tech/project/pypirun)
[![License](https://img.shields.io/pypi/l/pypirun.svg)](https://pypi.org/project/pypirun/)

The **pypirun** command is a utility that allows running a python command line script from a python package, even if it is
not installed.  

## Table of contents

- [Background](#background)
- [Install](#install)
- [Usage](#usage)
- [Examples](#examples)
- [Contribute](#contribute)
- [License](#license)

## Background

This utility was written to allow CI/CD Pipeline templates to be able to function properly when run in docker containers that did not have the python utility needed already installed.

This allows the templates to continue to work in different docker containers without requiring redundant steps to install the needed python packages.

## Install

This package can be installed using the Python pip package manager.

In order to install this package the python environment must have:

* Python 3.6 or newer
* pip version 8.1.1 or higher
* setuptools 40.0.0 or higher

```console
$ pip install pypirun
```

## Usage

    usage: pypirun [-h] [--interpreter INTERPRETER] [--debug] [--always_install] package command ...
    
    positional arguments:
      package                    Comma seperated list of packages to install, this list cannot contain spaces
      command                    Command to run
    
    optional arguments:
      -h, --help                 show this help message and exit
      --interpreter INTERPRETER  Python interpreter to use
      --debug                    Enable debug output
      --always_install           Install the command even if it exists in the path
      --upgrade_pip              Upgrade the pip before installing packages
      --upgrade_setuptools       Upgrade setuptools before installing packages
    
    Everything on the command line after the package name is executed in an environment with the package installed and on 
    the PATH.  As a result, the package and command must come after the optional arguments.
    
    By default pypirun will run the already installed command from the $PATH in the environment if it is found.  The
    --always_install flag will force it to install and run the command.

## Examples

### Run the serviceping utility from the python serviceping package

The following will run the command `serviceping -c 1 yahoo.com` from the [serviceping](https://pypi.org/project/serviceping/) package:

```console
$ pypirun serviceping serviceping -c 1 yahoo.com
SERVICEPING yahoo.com:80 (72.30.35.10:80).
from yahoo.com:80 (72.30.35.10:80): time=65.50 ms                                                                                                                                                                                                                 --- yahoo.com ping statistics ---
1 packages transmitted, 1 received, 0.0% package loss, time 73.038ms
rtt min/avg/max/dev = 65.50/65.50/65.50/0.00 ms
```

### Run the screwdrivercd.installdeps module from the screwdrivercd package as a script

```console
$ pypirun -m screwdrivercd screwdrivercd.installdeps
$
```

## Screwdriver V4 pypirun command

The pypirun package publishes a screwdriver v4 shared command called `python/pypirun`.

This command will set up python if it is not installed and install and run a the `pypirun` command line utility.

The following will run the command `serviceping -c 1 yahoo.com` from the [serviceping](https://pypi.org/project/serviceping/) package using the screwdriver sd-cmd:

```
sd-cmd python/pypirun@latest serviceping serviceping -c 1 yahoo.com
```

## Contribute

Please refer to [the contributing.md file](Contributing.md) for information about how to get involved. We welcome issues, questions, and pull requests. Pull Requests are welcome.

## Maintainers
Dwight Hubbard: dhubbard@verizonmedia.com

## License
This project is licensed under the terms of the [BSD](LICENSE-BSD) open source license. Please refer to [LICENSE](LICENSE) for the full terms.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/yahoo/pypirun",
    "name": "pypirun",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "python virtualenv pypi cli",
    "author": "Verizon Media Python Platform Team",
    "author_email": "254983+dwighthubbard@users.noreply.github.com",
    "download_url": "https://files.pythonhosted.org/packages/8e/28/fc5c4aa7347ed158b3dc2bbfa7152ed7f8bb191659b79c6e7d31d1d0b853/pypirun-3.0.966010.tar.gz",
    "platform": null,
    "description": "# pypirun\n\n[![Build Status](https://cd.screwdriver.cd/pipelines/2852/badge)](https://cd.screwdriver.cd/pipelines/2852)\n[![Codestyle](https://img.shields.io/badge/code%20style-pep8-lightgrey.svg)](https://www.python.org/dev/peps/pep-0008/)\n[![Code Coverage](https://codecov.io/gh/yahoo/pypirun/branch/master/graph/badge.svg)](https://codecov.io/gh/yahoo/pypirun)\n[![Wheel](https://img.shields.io/pypi/wheel/pypirun.svg)](https://pypi.org/project/pypirun/)\n[![Version](https://img.shields.io/pypi/v/pypirun.svg)](https://pypi.org/project/pypirun/)\n[![Downloads](https://pepy.tech/badge/pypirun)](https://pepy.tech/project/pypirun)\n[![License](https://img.shields.io/pypi/l/pypirun.svg)](https://pypi.org/project/pypirun/)\n\nThe **pypirun** command is a utility that allows running a python command line script from a python package, even if it is\nnot installed.  \n\n## Table of contents\n\n- [Background](#background)\n- [Install](#install)\n- [Usage](#usage)\n- [Examples](#examples)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Background\n\nThis utility was written to allow CI/CD Pipeline templates to be able to function properly when run in docker containers that did not have the python utility needed already installed.\n\nThis allows the templates to continue to work in different docker containers without requiring redundant steps to install the needed python packages.\n\n## Install\n\nThis package can be installed using the Python pip package manager.\n\nIn order to install this package the python environment must have:\n\n* Python 3.6 or newer\n* pip version 8.1.1 or higher\n* setuptools 40.0.0 or higher\n\n```console\n$ pip install pypirun\n```\n\n## Usage\n\n    usage: pypirun [-h] [--interpreter INTERPRETER] [--debug] [--always_install] package command ...\n    \n    positional arguments:\n      package                    Comma seperated list of packages to install, this list cannot contain spaces\n      command                    Command to run\n    \n    optional arguments:\n      -h, --help                 show this help message and exit\n      --interpreter INTERPRETER  Python interpreter to use\n      --debug                    Enable debug output\n      --always_install           Install the command even if it exists in the path\n      --upgrade_pip              Upgrade the pip before installing packages\n      --upgrade_setuptools       Upgrade setuptools before installing packages\n    \n    Everything on the command line after the package name is executed in an environment with the package installed and on \n    the PATH.  As a result, the package and command must come after the optional arguments.\n    \n    By default pypirun will run the already installed command from the $PATH in the environment if it is found.  The\n    --always_install flag will force it to install and run the command.\n\n## Examples\n\n### Run the serviceping utility from the python serviceping package\n\nThe following will run the command `serviceping -c 1 yahoo.com` from the [serviceping](https://pypi.org/project/serviceping/) package:\n\n```console\n$ pypirun serviceping serviceping -c 1 yahoo.com\nSERVICEPING yahoo.com:80 (72.30.35.10:80).\nfrom yahoo.com:80 (72.30.35.10:80): time=65.50 ms                                                                                                                                                                                                                 --- yahoo.com ping statistics ---\n1 packages transmitted, 1 received, 0.0% package loss, time 73.038ms\nrtt min/avg/max/dev = 65.50/65.50/65.50/0.00 ms\n```\n\n### Run the screwdrivercd.installdeps module from the screwdrivercd package as a script\n\n```console\n$ pypirun -m screwdrivercd screwdrivercd.installdeps\n$\n```\n\n## Screwdriver V4 pypirun command\n\nThe pypirun package publishes a screwdriver v4 shared command called `python/pypirun`.\n\nThis command will set up python if it is not installed and install and run a the `pypirun` command line utility.\n\nThe following will run the command `serviceping -c 1 yahoo.com` from the [serviceping](https://pypi.org/project/serviceping/) package using the screwdriver sd-cmd:\n\n```\nsd-cmd python/pypirun@latest serviceping serviceping -c 1 yahoo.com\n```\n\n## Contribute\n\nPlease refer to [the contributing.md file](Contributing.md) for information about how to get involved. We welcome issues, questions, and pull requests. Pull Requests are welcome.\n\n## Maintainers\nDwight Hubbard: dhubbard@verizonmedia.com\n\n## License\nThis project is licensed under the terms of the [BSD](LICENSE-BSD) open source license. Please refer to [LICENSE](LICENSE) for the full terms.\n",
    "bugtrack_url": null,
    "license": "BSD License",
    "summary": "Command line utility to run a command, installing needed python packages if it is not installed",
    "version": "3.0.966010",
    "project_urls": {
        "Homepage": "https://github.com/yahoo/pypirun"
    },
    "split_keywords": [
        "python",
        "virtualenv",
        "pypi",
        "cli"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d97a89f12cfdee50aa7a79ac91a2bcfe524966fca08aaab22ba0c083f981ec13",
                "md5": "4f0d7502b9a637f86564cb4e8130b895",
                "sha256": "124e838bf3d9e90d90b125fb6bf37a3d0ad920a5b14e2c956561e37dd51188b7"
            },
            "downloads": -1,
            "filename": "pypirun-3.0.966010-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4f0d7502b9a637f86564cb4e8130b895",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 9006,
            "upload_time": "2024-11-08T00:31:19",
            "upload_time_iso_8601": "2024-11-08T00:31:19.924093Z",
            "url": "https://files.pythonhosted.org/packages/d9/7a/89f12cfdee50aa7a79ac91a2bcfe524966fca08aaab22ba0c083f981ec13/pypirun-3.0.966010-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8e28fc5c4aa7347ed158b3dc2bbfa7152ed7f8bb191659b79c6e7d31d1d0b853",
                "md5": "f43cfbe652c191cf4120767da355f30c",
                "sha256": "14e2ddbbe4f3f4099fc868ae6e28d5fdc9124310c7278b895d2da8a0678d4fe2"
            },
            "downloads": -1,
            "filename": "pypirun-3.0.966010.tar.gz",
            "has_sig": false,
            "md5_digest": "f43cfbe652c191cf4120767da355f30c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 9936,
            "upload_time": "2024-11-08T00:31:18",
            "upload_time_iso_8601": "2024-11-08T00:31:18.161464Z",
            "url": "https://files.pythonhosted.org/packages/8e/28/fc5c4aa7347ed158b3dc2bbfa7152ed7f8bb191659b79c6e7d31d1d0b853/pypirun-3.0.966010.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-08 00:31:18",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "yahoo",
    "github_project": "pypirun",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": false,
    "tox": true,
    "lcname": "pypirun"
}
        
Elapsed time: 0.41536s