Skip to content

Commit 2f3a9f8

Browse files
Update poetry.md
1 parent 8378b21 commit 2f3a9f8

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

markdown/poetry.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,24 @@
2323
# Deactivate venv
2424
exit # ctrl-d
2525
26+
# Initialize existing project
27+
poetry init
28+
29+
# Install from requirements.txt
30+
poetry add `cat requirements.txt`
31+
2632
# Install multiple libraries
2733
poetry add google-auth google-api-python-client
2834
29-
# Initialize existing project
30-
poetry init
35+
# dev dependencies
36+
poetry add --group dev rich
37+
38+
# Install virtual environment w/o dev deps (creates venv if not present)
39+
poetry install --no-ansi --without dev
3140
3241
# Run script and exit environment
3342
poetry run python your_script.py
3443
35-
# Install from requirements.txt
36-
poetry add `cat requirements.txt`
37-
3844
# Update dependencies
3945
poetry update
4046
@@ -56,6 +62,6 @@
5662
asdf global poetry latest
5763
5864
# Install via asdf w/version
59-
ASDF_POETRY_INSTALL_URL=https://install.python-poetry.org asdf install poetry 1.2.2
60-
asdf local poetry 1.2.2
65+
ASDF_POETRY_INSTALL_URL=https://install.python-poetry.org asdf install poetry 1.3.2
66+
asdf local poetry latest # 1.3.2
6167
```

0 commit comments

Comments
 (0)