Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save expobrain/136d7667203fbd7e1bba40c787d27525 to your computer and use it in GitHub Desktop.
Save expobrain/136d7667203fbd7e1bba40c787d27525 to your computer and use it in GitHub Desktop.
Python Poetry Cheatsheet

Create a new project

poetry new <project-name>

Initialise an existing project

poetry init 

Add a new lib (prod & dev)

potry add <library>
potry add --dev <library>

Remove a lib

poetry remove <library>

Update a lib

poetry update <library>

Run app

poetry run python app.py

Enter virtual environment

poetry shell

Show dependencies

poetry show
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment