poetry template
New project
poetry new
poetry new poetry-template --src --name=poetry-template
or poetry init inside a folder
poetry init
Create .gitignore
curl -L https://www.toptal.com/developers/gitignore/api/python > .gitignore
Poetry env
poetry env info
poetry install # install all dependencies in the virtualenv
poetry shell # spawn a shell within the virtual environment
poetry show # show all packages
poetry update # update all packages
python src/poetry_template/main.py
# or simpl
poetry run python src/poetry_template/main.py
poetry build # package the project
poetry publish # publish the project
Add packages
poetry add <package>
poetry add ./lib/<package>
Install dependencies
poetry install --with jupyterlab
poetry install --only main
Jupyter
If use conda packages, use a separate venv in mini-conda
poetry run jupyter lab src/notebooks
requirements.txt generation
poetry export --without-hashes --with dev --format=requirements.txt > requirements.txt
Python Libs
- dask - Parallel computing
- FFTW - FFT Wrapper
- httpx - next generation HTTP client lib and cli
- aiohttp - Asyncio http client/server
- websockets - websockets client and server library
- aiogram - Asyncio telegram bot framework
- loguru - simple json logger
Python tools
Python Books
- Python Design Patterns - Python Design Patterns implementation of the Gang of Four book