This is a personal template for Python projects. This template expects to use asdf and Poetry to manage Python version and dependencies.
You must setup asdf in advance following this guide.
To install Python in asdf, you would need additional packages. If you are an ubuntu user, type the following command to install all required packages:
$ sudo apt update
$ sudo apt install make build-essential wget curl llvm \
libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev \
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
Finally, install Python and Poetry in asdf as follows:
# add python
asdf plugin-add python
asdf install python 3.12.2
# add poetry
asdf plugin-add poetry
asdf install poetry 1.8.2
Take the following steps to start your development.
- Edit pyproject.toml, e.g., rename the project name.
- Run
poetry install --no-root
to install some common libraries. - [Optional] Run
git config commit.template .gitmessage
to use gitmessage for commit.