xox: lightweight virtualenv orchestration
This project helps provision virtualenvs and dependencies for your Python code. It works like tox or nox, but your requirements are declared in your script.
Credit to the nox project for much of the implementation.
Installation
Use pip:
pip install --user xox
Usage
Before you import any other third-party modules, call xox.activate():
import xox
xox.activate("lxml", "requests>=1.0")
import lxml
import requests
This will create a virtualenv, install packages, and call os.exec() to replace the current process. The virtualenv will be re-used in subsequent runs.
You could also pass python='pythonX.Y' to specify a Python version, or silent=False to show output from pip.
… And that’s it! No custom executables or config files needed, just an extra header in your script.
Notes
Any code before your activate() call will be run twice: once without and once within the virtualenv. Any code after your activate() call will run only within the virtualenv.
Each virtualenv is stored in a subdirectory of system’s temporary directory named 'xox-virtualenvs'. No cleanup mechanism is provided - sorry!
Metadata
Release files for xox 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| xox-0.1.1.tar.gz | 2.5 kB | Details |
Release files / xox-0.1.1.tar.gz
| Download URL | xox-0.1.1.tar.gz |
|---|---|
| Size | 2.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ea6ec1a684ec5def1984bc65a1b9d35eabf208c68986d4cc17f06514dd3bf356
|
|
BLAKE2b-256 checksum How to use checksums |
c87fa78f0f404a89aa25d18bc56839b99ff23083007d98fa672a837908ada0fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.9.1 pkginfo/1.4.1 requests/2.18.4 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.46.1 CPython/2.7.17
|