Name | microvenv JSON |
Version |
2025.0
JSON |
| download |
home_page | None |
Summary | A minimal re-implementation of Python's venv module plus utilities |
upload_time | 2025-07-18 12:23:52 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | MIT License
Copyright (c) 2023 Brett Cannon
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. |
keywords |
venv
virtual environments
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# microvenv
Create a minimal virtual environment (and utility code around environments).
The key purpose of this module is for when the [`venv` module](https://docs.python.org/3/library/venv.html#module-venv) 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](https://docs.python.org/3/library/venv.html#module-venv) should be preferred and this module used as a fallback.
There is also utility code around virtual environments. See the [docs](https://microvenv.rtfd.io/) for details.
## CLI Usage
**NOTE**: The CLI is not available on Windows.
```console
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](https://docs.python.org/3/library/venv.html#venv.create).
```python
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](https://docs.python.org/3/library/venv.html#module-venv)
The code operates similarly to `py -m venv --symlinks --without-pip .venv`,
except that:
- There are no activation scripts (you can execute `python` in the virtual environment directly)
- Windows is not supported
Raw data
{
"_id": null,
"home_page": null,
"name": "microvenv",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "Brett Cannon <brett@python.org>",
"keywords": "venv, virtual environments",
"author": null,
"author_email": "Brett Cannon <brett@python.org>",
"download_url": "https://files.pythonhosted.org/packages/84/89/d30e42ec51af9f822087942a7bbfa0e156f35c8575be7949aead5d60f2b7/microvenv-2025.0.tar.gz",
"platform": null,
"description": "# microvenv\n\nCreate a minimal virtual environment (and utility code around environments).\n\nThe key purpose of this module is for when the [`venv` module](https://docs.python.org/3/library/venv.html#module-venv) 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.\n\nIn general, though, using the [`venv` module](https://docs.python.org/3/library/venv.html#module-venv) should be preferred and this module used as a fallback.\n\nThere is also utility code around virtual environments. See the [docs](https://microvenv.rtfd.io/) for details.\n\n## CLI Usage\n\n**NOTE**: The CLI is not available on Windows.\n\n```console\npython -m microvenv [--without-scm-ignore-files] [env_dir=\".venv\"]\n```\n\nIf 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`.\n\nFor programmatic usage, there is the `create()` function, which is analogous to the [`venv.create()` function](https://docs.python.org/3/library/venv.html#venv.create).\n\n```python\ndef create(env_dir: os.PathLike[str] | str = \".venv\", *, scm_ignore_files={\"git\"}) -> None\n```\n\nThe `microvenv/_create.py` file is also small enough to have its contents passed in via the `-c` flag to `python`.\n\n### Differences compared to the [`venv` module](https://docs.python.org/3/library/venv.html#module-venv)\n\nThe code operates similarly to `py -m venv --symlinks --without-pip .venv`,\nexcept that:\n\n- There are no activation scripts (you can execute `python` in the virtual environment directly)\n- Windows is not supported\n",
"bugtrack_url": null,
"license": "MIT License\n \n Copyright (c) 2023 Brett Cannon\n \n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.",
"summary": "A minimal re-implementation of Python's venv module plus utilities",
"version": "2025.0",
"project_urls": {
"Changelog": "https://github.com/brettcannon/microvenv/releases",
"Documentation": "https://microvenv.readthedocs.io/",
"Fiscal support": "https://github.com/sponsors/brettcannon/",
"Source": "https://github.com/brettcannon/microvenv"
},
"split_keywords": [
"venv",
" virtual environments"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "6dbffef7bca8a0049da3535e5b0117e9e6c16d6ad9bc9f793074e621c5a572ef",
"md5": "3034443747867fe8d6e35f444a28617f",
"sha256": "568155ec18af01c89f270d35d123ab803b09672b480c3702d15fd69e9cc5bd1e"
},
"downloads": -1,
"filename": "microvenv-2025.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3034443747867fe8d6e35f444a28617f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 8239,
"upload_time": "2025-07-18T12:23:50",
"upload_time_iso_8601": "2025-07-18T12:23:50.706410Z",
"url": "https://files.pythonhosted.org/packages/6d/bf/fef7bca8a0049da3535e5b0117e9e6c16d6ad9bc9f793074e621c5a572ef/microvenv-2025.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "8489d30e42ec51af9f822087942a7bbfa0e156f35c8575be7949aead5d60f2b7",
"md5": "ea993578ac9cb0165903923918ab964f",
"sha256": "8a2568a8390a4ffb5af2f05e7642454e03b887e582d192b6316326974eab5d0f"
},
"downloads": -1,
"filename": "microvenv-2025.0.tar.gz",
"has_sig": false,
"md5_digest": "ea993578ac9cb0165903923918ab964f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 12046,
"upload_time": "2025-07-18T12:23:52",
"upload_time_iso_8601": "2025-07-18T12:23:52.025183Z",
"url": "https://files.pythonhosted.org/packages/84/89/d30e42ec51af9f822087942a7bbfa0e156f35c8575be7949aead5d60f2b7/microvenv-2025.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-18 12:23:52",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "brettcannon",
"github_project": "microvenv",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "microvenv"
}