CLI Tool to help manage Pipenv Enviroments and corresponding Project Directories.
Project description
Pipes
A friendly Pipenv Environment Switcher for your shell
Overview
Pipes is a Pipenv companion CLI tool that provides a quick way to jump between your pipenv powered projects.
Documentation: https://pipenv-pipes.readthedocs.io.
Install
>>> pip install pipenv-pipes
Usage
List available Pipenv Environments
>>> pipes
[ Pipenv Environments ]
0: project1-LwEMcb8W *
1: project2-R1v7_ynT *
* Indicates the Environment already has a Project Directory associated.
Activate Pipenv Enviroment Shell
$ pipes project1
This would cd into directory /path/to/project1 and the corresponding Pipenv Shell is activated.
If query term (project1) returns 2 or more matches, a more specific query term needs to be used. For instance, to match 0: project1-LwEMcb8W user would need to type project1 or Lw` to get a single match. If ``envname argument was project, activation would fail since Pipes cannot guess which enviroment users wants (`project1 or project2).
The environment index can also be used. To active the enviroment 1: project2-R1v7_ynT user would run:
$ pipes 1:
Link Pipenv Environment to a Project Directory
Before you can switch into a project using Pipes, the selected environment must have a project directory associated with it.
To link a project directory with its environment run:
$ pipes --link /path/to/project1
Pipes will find the associated Pipenv Environmnet by using pipenv --venv from that location, and then store the project directory path within the environment (.project file)
This pattern is similar to what virtualenvwrapper’s workon uses to link a VirtualEnviroment folder to the corresponding project.
Environments that have associated project folders are shown with an asterisk * on the Pipenv Environment. To see the Environment list use:
$ pipes --list
[ Pipenv Environments ]
0: project1-LwEMcb8W *
1: project2-R1v7_ynT *
To see a detail output of the enviroments and the corresponding paths use the --verbose option:
$ pipes --list -verbose
[ Pipenv Environments ] /Users/gtalarico/.local/share/virtualenvs
0: project1-LwEMcb8W
Environment: /Users/gtalarico/.local/share/virtualenvs/project1-LwEMcb8W
Project Dir: /Users/gtalarico/dev/flask-vue
1: project2-R1v7_ynT
Environment: /Users/gtalarico/.local/share/virtualenvs/project2-R1v7_ynT
Project Dir: /Users/gtalarico/dev/genome
Other Commands
For more details check pipes --help
Todo
Add Documentation
Add tests + Contributing
Setup Travis CI
Add cd-only flag (don’t activate shell)
Credits
Send me a message on twitter
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
History
0.4.2 (2018-05-06)
Full Test Suite
Fixed Envname character bug
Added –version
0.4.1 (2018-05-02)
Allow New Line on Read (PR #3)
Typo PR #2
0.4.0 (2018-05-02)
Renamed Set/Unset to Link/Unlink
Use pipenv –venv to verify project directory
0.3.0 (2018-05-02)
Improved Set/Unset CLI
Improved validation for Project Directories
0.2.0 (2018-05-02)
New CLI API (single command for simplicity)
Indicates if has project directory set on project list
Updated Verbose Project List
0.1.2 (2018-05-02)
Bug Fixes
Updated PipFile
0.1.1 (2018-05-02)
Disallow Pipes when VENV is active.
Added Colorama
0.1.0 (2018-05-02)
First release on PyPI.
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
Hashes for pipenv_pipes-0.4.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7716f73bdfc512fadfdd93c9bfe015b73deb0592951f80c0302f8c1a7083792 |
|
MD5 | 717abbaa5a7d50e61f2f9cb173b1bccb |
|
BLAKE2b-256 | 8d0618d5e3a6deefe5497f7fbb57eadd1c3e71d94543a16f261c47c44279a2d4 |