A minimal re-implementation of Python's venv module
Project description
microvenv
Create a minimal virtual environment.
This module is meant for when the venv module has been removed from the standard library by your Python distribution. Because venv is not available on PyPI and is developed in the stdlib, it is not possible to install it using pip or simply copy the code and expect it to work with older versions of Python. This module then attempts to be that portable alternative for creating virtual environments.
In general, though, using the venv module should be preferred and this module is only used as a fallback.
Usage
python microvenv.py [env_dir=".venv"]
If an argument is provided to the script, it is used as the path to create the virtual environment in. Otherwise, the virtual environment is created in .venv.
For programmatic usage, there is the create() function, which is analogous to the venv.create() function.
def create(env_dir: os.PathLike = ".venv") -> None
The microvenv.py file is also small enough to have its contents passed in via the -c flag to python.
Differences compared to the venv module
The module operates similarly to py -m venv --symlinks --without-pip .venv,
except that:
- There are no activation scripts (you can execute
pythonin the virtual environment directly) - Windows is not supported
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file microvenv-2023.1.0.tar.gz.
File metadata
- Download URL: microvenv-2023.1.0.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6125ad1a389e6a6fb28053fbe08c7712cc0d029597098aff1e013b8f7fb570ec
|
|
| MD5 |
8b50b81ec5ba4efdc53978d49fddffde
|
|
| BLAKE2b-256 |
34fae67a82690ff1cc3bde7aa7fccd41db6dc64a06d68b08c33730c61a462ae2
|
File details
Details for the file microvenv-2023.1.0-py3-none-any.whl.
File metadata
- Download URL: microvenv-2023.1.0-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
98bef6cfe6f858624d3f8528a157c68dbc5d8e62f2663e9004495ee26cdbd981
|
|
| MD5 |
8c3ce424115cbd8e8072e54a79bc1517
|
|
| BLAKE2b-256 |
821eac53072b9786d96313d0f707ad02729bd86e69035326113577e40bc52843
|