Skip to content

schr1k/FastapiTemplate

Repository files navigation

Setup

  1. Install dependencies.

    uv sync
  2. Install pre-commit to automatically lint and format via ruff before commit

    uv run pre-commit install
  3. Generate ES256 private key

    openssl ecparam -name prime256v1 -genkey -noout -out src/auth/certs/private_key.pem
  4. Generate ES256 public key

    openssl ec -in src/auth/certs/private_key.pem -pubout -out src/auth/certs/public_key.pem

Launch

Docker

  • Development mode (fast-refresh)

    docker compose watch
  • Production mode

    docker compose up --build -d

Pure python

  • Development mode (fast-refresh)

    uv run fastapi dev
  • Production mode

    uv run --no-dev fastapi run

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Sponsor this project