microvenv
Create a minimal virtual environment (and utility code around environments).
The key purpose of this module is 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 used as a fallback.
There is also utility code around virtual environments. See the docs for details.
CLI Usage
NOTE: The CLI is not available on Windows.
python -m microvenv [--without-scm-ignore-files] [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[str] | str = ".venv", *, scm_ignore_files={"git"}) -> None
The microvenv/_create.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 code 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
Release files for microvenv 2025.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| microvenv-2025.0.tar.gz | 12.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| microvenv-2025.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.3 kB
Release files / microvenv-2025.0.tar.gz
| Download URL | microvenv-2025.0.tar.gz |
|---|---|
| Size | 12.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8a2568a8390a4ffb5af2f05e7642454e03b887e582d192b6316326974eab5d0f
|
|
BLAKE2b-256 checksum How to use checksums |
8489d30e42ec51af9f822087942a7bbfa0e156f35c8575be7949aead5d60f2b7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 18, 2025.
Transparency logRelease files / microvenv-2025.0-py3-none-any.whl
| Download URL | microvenv-2025.0-py3-none-any.whl |
|---|---|
| Size | 8.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
568155ec18af01c89f270d35d123ab803b09672b480c3702d15fd69e9cc5bd1e
|
|
BLAKE2b-256 checksum How to use checksums |
6dbffef7bca8a0049da3535e5b0117e9e6c16d6ad9bc9f793074e621c5a572ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 18, 2025.
Transparency log