Python virtual environment management can be a little bit inconvenient sometimes. This magical tool aims at making this process simpler.
Using pyorbs is easy. You install it:
$ pip install pyorbs
then create a new orb in your project folder:
$ orb -m magic Making orb "magic" using "requirements.txt"...
and whoosh, ready to go:
$ orb magic -c ./magical-app Activating orb "magic"... Running "./magical-app"...
$ orb magic Activating orb "magic"... Orb "magic" is glowing now (magic) $ ./magical-app
There are a few good things about pyorbs:
Easy to install
Provides a single and short
Streamlines local development, deployment and remote execution / troubleshooting
Supports deterministic deployments through lockfiles
Straightforward behavior using only pip and the now-standard
venvunder the hood
Has no dependencies beyond pip and the Python standard library
Supports bash and fish shells and works reasonably well with tmux
There are also a few bad things about pyorbs:
Does not work with zsh, csh or tcsh shells
May not work on Windows
Okay, but why?
Why on earth did we need yet another tool? Couldn’t we just use virtualenvwrapper, Pipenv, Poetry or a decent Python IDE for all of this?
It seems that all of these tools have certain limitations that make things inconvenient at times. To utilize all of virtualenvwrapper’s features one has to edit a shell startup file and then remember to source it when running an app via systemd, cron, Airflow or something similar. Pipenv does not provide a convenient way of deploying an application to more than two environments and has some other limitations as well. Poetry uses a series of non-standard approaches (for example, an arbitrary lockfile format). An IDE can be clumsy too when one would like to run or troubleshoot an app in a distributed system.
Generally, pyorbs is somewhere between virtualenvwrapper and Pipenv, trying to support a similar development workflow as virtualenvwrapper while also providing some useful features for deterministic deployments in heterogeneous systems.