Skip to main content

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

  1. Create a Virtual Environment

    • Choose the manager (venv, virtualenv, or conda).
    • Specify the environment name and location.
    • PolyVirt automatically records it in its registry.
  2. List and Search

    • Lists all tracked environments, grouped by manager.
    • Offers a filesystem scan mode to find untracked environments.
  3. 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 for path\Scripts\activate.bat.
  4. Remove Environments

    • Remove environments from the registry only, or remove them from disk entirely (--purge).
  5. Automatic Manager Detection

    • If a selected manager (venv, virtualenv, conda) is not available, PolyVirt will exit gracefully with an informative message.
  6. Custom Decorators

    • Demonstrates usage of decorators (decorators.py) to display environment usage info.
  7. Future GUI

    • Currently, PolyVirt is a CLI tool (via argparse). A future GUI can be built on top of the same modules.

Requirements

  • Python 3.7+
  • colored
  • tqdm

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

polyvirt-0.1.0.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

polyvirt-0.1.0-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

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

Hashes for polyvirt-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b81b66d6af5aea7fb884ad249551d6442a882c29ce467232ff8bb81af6cb7c83
MD5 1a6154b44cb71448ec30033819f13531
BLAKE2b-256 7d4879c2b55c3938f9d20ed1152000a3c38ad16bc619eba4528d91a744115460

See more details on using hashes here.

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

Hashes for polyvirt-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d015cc3a20bf420a66978884ca1cf52c6a47b8f82231fff12eb731a66a1d5dc7
MD5 ecd472642920f35798534d557d77c297
BLAKE2b-256 7d76c6204bee0fbf7a132d6fe179aea85a4126d0b4e58d602e0f2a846d3f8510

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page