Working With Poetry

python poetry packaging

Installing A Working Environment With An Existing Project

This always messes me up.

  1. Run poetry install. This will create a new virtual env and install all your dependencies in it.

    ... poetry install
    
  2. Now to use it properly, you need to be in the shell:

    ... poetry shell
    
  3. From here any application commands you have registered in your poetry pyproject.toml file should work:

    ... app-cmd --help
    

    In theory, you should be able to run this outside the shell:

    ... poetry run app-cmd --help
    

    …however, in my experience this is not always the case.