A CLI tool to manage Python virtual environments across multiple managers.
Project description
PolyVirt
PolyVirt is a Python CLI tool to create, track, and manage virtual environments across different environment managers (such as venv, virtualenv, and conda). It maintains a simple JSON-based registry and can optionally search your filesystem for untracked environments. It also allows for removing environments from the registry or completely deleting them from disk.
Features
-
Create a Virtual Environment
- Choose the manager (
venv,virtualenv, orconda). - Specify the environment name and location.
- PolyVirt automatically records it in its registry.
- Choose the manager (
-
List and Search
- Lists all tracked environments, grouped by manager.
- Offers a filesystem scan mode to find untracked environments.
-
Activate and Switch
- You can select/activate a virtual environment from your tracked list.
- On Unix-like shells, you’ll see instructions for
source path/bin/activate; on Windows, instructions forpath\Scripts\activate.bat.
-
Remove Environments
- Remove environments from the registry only, or remove them from disk entirely (
--purge).
- Remove environments from the registry only, or remove them from disk entirely (
-
Automatic Manager Detection
- If a selected manager (
venv,virtualenv,conda) is not available, PolyVirt will exit gracefully with an informative message.
- If a selected manager (
-
Custom Decorators
- Demonstrates usage of decorators (
decorators.py) to display environment usage info.
- Demonstrates usage of decorators (
-
Future GUI
- Currently, PolyVirt is a CLI tool (via
argparse). A future GUI can be built on top of the same modules.
- Currently, PolyVirt is a CLI tool (via
Requirements
- Python 3.7+
coloredtqdm
Install dependencies using:
pip install -r requirements.txt
Installation
Install PolyVirt locally in editable mode:
cd polyvirt
pip install -e .
To install from PyPI (after it is published):
pip install polyvirt
Run it:
polyvirt --help
Usage
Create a new environment
polyvirt create --manager venv --name myenv --path /home/user/myenv
Create a Conda environment
polyvirt create --manager conda --name condaenv --path /home/user/condaenv
List tracked environments
polyvirt list
Scan filesystem for untracked environments
polyvirt scan --start /home/user --max-depth 4
Show activation instructions for an environment
polyvirt activate --name myenv
Remove environment from registry only
polyvirt remove --name myenv
Remove environment from registry AND delete from disk
polyvirt remove --name myenv --purge
License
PolyVirt is licensed under the MIT License. See LICENSE for details.
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 polyvirt-0.1.0.tar.gz.
File metadata
- Download URL: polyvirt-0.1.0.tar.gz
- Upload date:
- Size: 9.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b81b66d6af5aea7fb884ad249551d6442a882c29ce467232ff8bb81af6cb7c83
|
|
| MD5 |
1a6154b44cb71448ec30033819f13531
|
|
| BLAKE2b-256 |
7d4879c2b55c3938f9d20ed1152000a3c38ad16bc619eba4528d91a744115460
|
File details
Details for the file polyvirt-0.1.0-py3-none-any.whl.
File metadata
- Download URL: polyvirt-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d015cc3a20bf420a66978884ca1cf52c6a47b8f82231fff12eb731a66a1d5dc7
|
|
| MD5 |
ecd472642920f35798534d557d77c297
|
|
| BLAKE2b-256 |
7d76c6204bee0fbf7a132d6fe179aea85a4126d0b4e58d602e0f2a846d3f8510
|