-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
72 lines (61 loc) · 2.05 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
[tool.poetry]
name = "python-fastapi-postgres-starter"
version = "0.0.1"
description = "A starter template to use for Python+Fastapi applications, with SQLAlchemy as ORM and lots of DevOps configuration enabled"
authors = ["godraadam"]
readme = "README.md"
packages = [{include = "python_fastapi_postgres_starter"}]
[tool.poetry.dependencies]
python = "^3.9.1"
passlib = "^1.7.4"
uvicorn = "^0.20.0"
psycopg2-binary = "^2.9.5"
alembic = "^1.8.1"
python-jose = "^3.3.0"
cryptography = "^38.0.4"
cuid2 = "^1.2.0"
fastapi = "^0.89.1"
sqlalchemy = "^2.0.1"
pydantic = {extras = ["dotenv"], version = "^1.10.4"}
[tool.poetry.group.dev.dependencies]
black = "^22.10.0"
ruff = "^0.0.141"
pytest = "^7.2.0"
httpx = "^0.23.1"
pytest-mock = "^3.10.0"
pytest-cov = "^4.0.0"
poethepoet = "^0.18.1"
pytest-pretty = "^1.1.0"
mypy = "^0.991"
types-passlib = "^1.7.7.7"
types-python-jose = "^3.3.4.3"
sqlalchemy-stubs = "^0.4"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.ruff]
line-length = 100
target-version = "py310"
[tool.ruff.per-file-ignores]
"__init__.py" = ["F401", "F403"] # ignore unused imports in __init__.py files
[tool.black]
line-length = 100
target-version = ["py310"]
[tool.poe.tasks]
test = {shell="APP_ENV=test poetry run pytest -s tests/"}
coverage = {shell="APP_ENV=test poetry run pytest -s --cov=app tests/"}
prod = {shell="APP_ENV=prod poetry run uvicorn app.main:app --host 0.0.0.0 --port 8000"}
dev = {shell = "APP_ENV=dev poetry run uvicorn app.main:app --host 0.0.0.0 --port 8000"}
watch = {shell = "APP_ENV=dev poetry run uvicorn app.main:app --reload --host 0.0.0.0 --port 8000"}
fix = {shell = "poetry run black . && poetry run ruff --fix . && poetry run mypy app"}
check = {shell = "poetry run black . --check && poetry run ruff . && poetry run mypy app"}
db_push = {shell="APP_ENV=dev poetry run alembic revision --autogenerate"}
db_pull = {shell="APP_ENV=dev poetry run alembic upgrade head"}
[tool.mypy]
python_version = "3.10"
plugins = "sqlmypy"
[[tool.mypy.overrides]]
module = [
"cuid2"
]
ignore_missing_imports = true