Note
This repository is a template of FastAPI with Dependency Injector
Copy .envrc.tpl
to .envrc
for setting environment variables with direnv
cp .envrc.tpl .envrc
direnv allow
✔️ Create Virtual Environment with Poetry
- Install python with pyenv
pyenv install ${PYTHON_VERSION}
- Set poetry config
poetry config virtualenvs.in-project true
- Create virtualenv(
.venv
) with poetry
poetry env use $(pyenv root)/versions/${PYTHON_VERSION}/bin/python
- Install python dependencies with poetry(
poetry.lock
)
poetry install
- Activate virtualenv(
.venv
)
eval $(poetry env activate)
- Activate virtualenv(
.venv
) with plugin(python-poetry/poetry-plugin-shell)
poetry shell
pre-commit: Link
pre-commit install -t pre-commit
pre-commit install -t pre-push
🖱️ Run Manually
pre-commit run
🖱️ How to Skip Hooks
After installing the hooks, you can use the --no-verify
option to skip it.
git commit --no-verify
git push --no-verify
Tip
For details on the make commands, refer to the Makefile
make run
make test
Check lint & format only
make check
Format
make format
- Maintainer: @devbruce