neo-neo-todo/backend/pyproject.toml

71 lines
1.8 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",
"bcrypt>=4.1.2", # hashing passwords
"zxcvbn>=4.4.28", # rate password strength
"itsdangerous>=2.1.2", # signing user tokens
"redis>=5.0.1",
"psycopg[pool]>=3.1.18",
"fastapi-limiter>=0.1.6",
]
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"]
[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"}
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/"], env_file = "testing.env"}