neo-neo-todo/backend/pyproject.toml
minhtrannhat 4a72d88ba2
feat(api): login and authentication routes
- Remove fastapi-limiter, we will rate limit at load balancer level as
it is too hard to get fastapi-limiter to play nice with pytest.
- Wrote technical writeups on how the login flow and check for user
authentication status work
2024-03-23 14:53:33 -04:00

78 lines
2.1 KiB
TOML

[project]
name = "neo-neo-todo"
version = "0.1.0"
description = "A todo API"
authors = [
{name = "minhtrannhat", email = "minh@minhtrannhat.com"},
]
dependencies = [
"fastapi>=0.103.1",
"uvicorn[standard]>=0.23.2",
"httpx>=0.26.0",
"pydantic[email]>=2.5.3",
"zxcvbn>=4.4.28", # rate password strength
"itsdangerous>=2.1.2", # signing user tokens
"redis>=5.0.1",
"psycopg[pool]>=3.1.18",
"pytest-cov>=4.1.0",
"python-multipart>=0.0.9",
"python-jose[cryptography]>=3.3.0",
"bcrypt>=4.1.2",
]
requires-python = ">=3.11"
readme = "README.md"
license = {text = "GPLv3"}
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
[tool.pdm.dev-dependencies]
dev = [
"ruff>=0.0.291",
"black>=23.9.1",
"pytest>=7.4.2",
"pytest-asyncio>=0.21.1",
"freezegun>=1.4.0",
]
[tool.ruff]
line-length = 88
# pyflakes, pycodestyle, isort
lint.select = ["F", "E", "W", "I001"]
[tool.black]
target-version = ["py311"]
[tool.pytest.ini_options]
addopts = "--showlocals"
asyncio_mode = "auto"
pythonpath = ["src"]
filterwarnings = [
"error",
'ignore::DeprecationWarning',
]
[tool.pdm.scripts]
# python code formatting
format-black = "black src/ tests/"
# python code linting
lint-ruff = "ruff check src/ tests/"
format = {composite = ["format-black"]}
lint = {composite = ["lint-ruff"]}
start = {cmd = "uvicorn --workers 2 neo_neo_todo.main:app", env_file = "development.env"}
dev = {cmd = "uvicorn neo_neo_todo.main:app --reload", env_file = "development.env"}
dev-test = {composite = ["recreate-db-base", "migration-base", "generate-test-data", "dev"], env_file = "development.env"}
recreate-db-base = "python3 src/neo_neo_todo/utils/database.py"
migration-base = "python3 src/neo_neo_todo/migrations/0.py"
recreate-db = {composite = ["recreate-db-base", "migration-base"], env_file = "development.env"}
generate-test-data = "python3 src/neo_neo_todo/migrations/test_data.py"
test = {composite = ["recreate-db-base", "migration-base", "generate-test-data", "pytest tests/ --cov=src.neo_neo_todo"], env_file = "testing.env"}