vpyapp.py
is a simple, single-file script that can be sourced with curl to bootstrap installation
and launching of of cached virtualized python applications.
- Introduction
- Installation
- Usage
- Known issues and limitations
- Getting help
- Contributing
- License
- Authors and history
Python script vpyapp.py
is intended to be sourced with curl and run directly. it manages a set of named
"virtual python applications", each with their own dedicated directory and virtualenv under
~/.cache/vpyapp/apps
. It's simple CLI allows the user to run commands provided by isolated cached
python applications, without requiring explicit creating of virtualenvs, installation of prerequisites,
etc.
Python: Python 3.7+ is required. See your OS documentation for instructions. curl: The intended zero-install web-sourced usage pattern described below makes use of curl.
The intended use of vpyapp.py
is as a zero-install curl-sourced script; e.g.,:
curl -sSL https://raw.githubusercontent.com/sammck/vpyapp/latest/vpyapp.py | python3 - <vpyapp-command> [<arg>...]
The latest
tag will be maintained on this repository to point to the latest stable version.
Alternatively, vpyapp.py
may be copied anyhere and run directly as a script; e.g.,:
./vpyapp.py <vpyapp-command> [<arg>...]
Regardless of whether the script is sourced locally or via curl, the command-line interface is the same:
usage: vpyapp.py [-h] [--traceback] [-v] {version,install,run} ...
optional arguments:
-h, --help show this help message and exit
--traceback, --tb Display detailed exception information
-v, --verbose Verbose output
usage: vpyapp.py version [-h]
Display the version of vpyapp.py being used.
usage: vpyapp.py install [-h] [-n APP_NAME] [-u] [--clean] [-o APP_PATH_FILE] package_name
Install a python app/package in its own virtualenv private to this user.
positional arguments:
package_name The package to install, as provided to "pip3 install".
optional arguments:
-h, --help show this help message and exit
Local name of the app. By default, derived from package_name
-u, --update Update the package if it is already installed
--clean Force a clean installation of the package
-o APP_PATH_FILE, --app-path-file APP_PATH_FILE
The name of a file to which the installed application path will be written
Silently install/update a vpyapp if necessary, then invoke a command in the virtualenv of the vpyapp. Install output is hidden.
usage: vpyapp.py run [-h] [-n APP_NAME] [-u] [--clean] package_name ...
Install a python app/package in its own virtualenv and run a command in the virtualenv.
positional arguments:
package_name The package to install, as provided to "pip3 install".
app_cmd... Command and arguments as would be used within the virtualenv.
optional arguments:
-h, --help show this help message and exit
-u, --update Update the package if it is already installed
--clean Force a clean installation of the package
vpyapp.py
may be imported as a module and its run
function can be called from other scripts if desired.
- TBD
Please report any problems/issues here.
Pull requests welcome.
vpyapp.py
is distributed under the terms of the MIT License. The license applies to this file and other files in the GitHub repository hosting this file.
The author of vpyapp.py
is Sam McKelvie.