Skip to content

Features

bruhtus edited this page Jul 4, 2021 · 1 revision

Pyv Features

You might ask, "if pyv is only a wrapper around default python virtual environment command, then what makes it different from using default python virtual environment command directly?". Ok, so here's pyv key features:

The Command

Pyv command is much shorter than default python venv, here's a list of the command:

  • pce (you can think it as abbrivation for "pyv create environment")
  • pre (you can think it as abbrivation for "pyv remove environment")
  • pae (you can think it as abbrivation for "pyv activate environment")
  • pde (you can think it as abbrivation for "pyv deactivate environment")
  • pve (you can think it as abbrivation for "pyv view-list environment")

Git Repo Name as Python Venv Name

If you're too lazy to give a name to every python venv you created (like myself), then you can use the git repo name as your python venv name.

Familiar Shell Command

Pyv goal is to be a minimalist approach to manage python venv, so you only need python (at least the one that has python -m venv command) and git (optional). So, to make pyv as minimal as possible, i only use simple POSIX compliant shell command. For example, the pve command is just an alias for ls command and pre is just an alias for rm command.

Please keep in mind that i only test this in ZSH and BASH, that's why i'm using "POSIX compliant shell" term because i'm not sure how it will behave in non POSIX compliant shell.

Decoupled From Project Directory

You don't need to be in specific project directory to access python virtual environment, all you need to do is give pyv the name of virtual environment you want to access.

Clone this wiki locally