Skip to content

Instantly share code, notes, and snippets.

@koji
Created April 2, 2024 03:45
Show Gist options
  • Save koji/2060fd2715dba1b4492f292694821896 to your computer and use it in GitHub Desktop.
Save koji/2060fd2715dba1b4492f292694821896 to your computer and use it in GitHub Desktop.
poetry commands
# create a new project
poetry new {project_name}

# add a package
poetry add {package_name}

# install dependencies
poetry install

# run a script without virtual env
poetry run python {python_file_name}

# start virtual env
poetry shell

# then
python {python_file_name}

# exit virtual env
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment