Skip to content

devbruce/fastapi-di-tpl

Repository files navigation

FastAPI with Dependency Injector

github-action release
python fastapi dependency-injector

Note

This repository is a template of FastAPI with Dependency Injector

πŸ“– How to Set Local Environment

πŸ› οΈ Prerequisites


βœ”οΈ Set Environment Variables

Copy .envrc.example to .envrc for setting environment variables with direnv

cp .envrc.example .envrc
direnv allow

βœ”οΈ Create Virtual Environment with uv

uv sync
  • Activate virtualenv(.venv)
source .venv/bin/activate

βœ”οΈ Install pre-commit Hooks(.git/hooks)

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

πŸš€ Run Server on Local

make run

πŸ’― Test

make test

βœ… Lint & Format

Check lint & format only

make check

Format

make format



πŸ‘€ Authors

  • Maintainer: @devbruce

About

FastAPI with Dependency Injector Template

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published