Pipenv
Introduction to Pipenv
From the Pipenv documentation:
Pipenv is a tool that aims to bring the best of all packaging worlds (bundler, composer, npm, cargo, yarn, etc.) to the Python world. Windows is a first-class citizen, in our world.
It automatically creates and manages a virtualenv for your projects, as well as adds/removes packages from your
Pipfileas you install/uninstall packages. It also generates the ever-importantPipfile.lock, which is used to produce deterministic builds.
Installing Pipenv
Pipenv can be installed via Pip:
pip install pipenvUsing Pipenv With Cement
First install Cement, and generate a project:
pip install cement
cement generate project ./myappIn the generated ./myapp directory:
### setup requirements
pipenv install -r requirements.txt
### setup requirements for dev
pipenv install -r requirements-dev.txt --devThis will create the Pipfile and ./Pipfile.lock. You will then need to modify Pipfile to include the application console script:
[scripts]
myapp = "python -m myapp.main"Your app can then be run under pipenv:
pipenv run myapp --helpLast updated