Virtual Environments

  • https://www.integralist.co.uk/posts/python-management/
  • Poetry - dependency management and package management too. Better than pipenv.
    • Having different dependencies management for DEV, PROD envs.
    • combines requirements.txt, setup.cfg, MANIFEST.ini.
    • Includes all best practices of project configuration.
  • Pipenv is a packaging tool for Python that solves some common problems associated with the typical workflow using pipvirtualenv, and the good old requirements.txt. Pipenv is slower than poetry.

Add to PATH

export PATH=$PATH:~/opt/bin:~/dev/bin
echo $PATH

Poetry

  • pyproject.toml is very important thing here. poetry.lock is helper that locks the versions of dependencies.
  • poetry.lock file prevents you from automatically getting the latest versions of your dependencies, everyone in the project will have the same versions. To update, you can use poetry update command. This will fetch the latest matching versions (according to your pyproject.toml file) and update the lock file with the new versions. (This is equivalent to deleting the poetry.lock file and running installagain.)

Resources

SuperMade with Super