Mr Piper & Django
🤗
Who's Mr Piper?
Simple project package management
Typical workflow for installing packages
- Create a virtual environment
- Activate virtual environment
- Install dependency `pip install package_name`
- Add package_name to requirements.txt
- Freeze requirements with `pip freeze > requirements-freeze.txt`
What if... we just did
piper add package_name
What does it do?
piper add package_name
- Creates the project's virtual environment (if it doesn't exist)
- Creates requirement files (if they don't exist)
- Installs package inside virtualenv
- Automatically adds package to requirement files
- Automatically generates lock/freeze file
Typical workflow for removing packages
- Uninstall package with `pip uninstall package_name`
- Remove package_name from requirements.txt
- Freeze requirements with `pip freeze > requirements-freeze.txt`
Gotcha!
- Delete virtualenv
- Create virtualenv
- Remove package_name from requirements.txt
- Install from requirements.txt
- Freeze requirements with `pip freeze > requirements-freeze.txt`
pip uninstall doesn't remove dependencies
What if... we just did
piper remove package_name
What does it do?
piper remove package_name
- Deducts dependencies that can be safely uninstalled
- Uninstalls package_name and all safe to delete deps
- Updates requirements/base.txt and requirements/dev.txt
- Updates lock files
The API
What does it do?
piper init
Initialises the project
- Creates virtualenv (default .virtualenvs/project_virtualenv)
- Creates requirement files
- Creates .piper file
piper add <package>
piper add --dev <package>
piper remove <package>
piper install
piper install --dev
piper outdated
piper outdated --all
piper upgrade --patch
piper upgrade --latest
piper upgrade --minor
🔥Hot code!🔥
aka a few bugs :)
TODO LIST
- Python 2 support
- More tests
- Pipfile support
https://github.com/jamespacileo/mrpiper
Thank you! :)
Mr Piper & Django
By James Pacileo
Mr Piper & Django
- 850