Getting Started

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:

$ pip3 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"...

or, alternatively:

$ orb magic
Activating orb "magic"...
Orb "magic" is glowing now
(magic) $ ./magical-app

Features

There are a few good things about pyorbs:

  • Easy to install.

  • Provides a single and short orb command.

  • Streamlines local development, deployment and remote execution / troubleshooting.

  • Supports deterministic deployments through lockfiles.

  • Straightforward behavior using only pip and the now-standard venv under the hood.

  • Supports bash and fish shells and works reasonably well with tmux. Yay.

Limitations

There are also a few bad things about pyorbs:

  • Does not support Python 2 virtual environments.

  • Does not work with zsh, csh or tcsh shells.

  • May not work with fish in some cases due to this bug in Python’s venv.

  • May not work on Windows.

It may be important to mention that most of these limitations are not a result of some architectural decisions, we just simply did not have the time and need to thoroughly test pyorbs on systems other than ours so far.

Okay, but why?

Why on earth did we need yet another tool? Couldn’t we just use virtualenvwrapper, Pipenv 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. 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.