-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
162 lines (150 loc) · 3.92 KB
/
Copy pathpyproject.toml
File metadata and controls
162 lines (150 loc) · 3.92 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
[project]
name = "FastAPI-Postgres-Template"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
authors = [{ name = "HBilal Khan", email = "hbilal@texagon.io" }, { name = "M Talha", email = "mtalha@texagon.io" }]
license = { text = "Proprietary" }
urls = { Homepage = "https://example.com/saas-backend", Repository = "https://github.com/Texagon-Dev/fastapi-hexagonal-ddd-postgres-template", Issues = "https://github.com/Texagon-Dev/fastapi-hexagonal-ddd-postgres-template/issues" }
requires-python = ">=3.12"
dependencies = [
"aiocache[redis]>=0.12.3",
"alembic==1.16.1",
"annotated-types==0.7.0",
"anyio==4.9.0",
"apscheduler>=3.11.0",
"asyncpg>=0.30.0",
"bcrypt==4.3.0",
"cffi==1.17.1",
"click==8.1.8",
"cryptography==45.0.3",
"dnspython==2.7.0",
"ecdsa==0.19.1",
"email-validator==2.2.0",
"exceptiongroup==1.3.0",
"fastapi==0.115.12",
"greenlet==3.2.2",
"h11==0.16.0",
"idna==3.10",
"jinja2>=3.1.6",
"mako==1.3.10",
"markupsafe==3.0.2",
"passlib==1.7.4",
"psycopg2-binary>=2.9.10",
"pyasn1==0.6.1",
"pycparser==2.22",
"pydantic==2.11.5",
"pydantic-core==2.33.2",
"pyotp>=2.9.0",
"python-dotenv==1.1.0",
"python-jose==3.5.0",
"python-multipart==0.0.20",
"qrcode[pil]>=8.2",
"requests>=2.32.3",
"rsa==4.9.1",
"sentry-sdk[fastapi]>=2.34.0",
"six==1.17.0",
"slowapi==0.1.9",
"sniffio==1.3.1",
"sqlalchemy[asyncio]==2.0.41",
"starlette==0.46.2",
"tomli==2.2.1",
"typing-extensions==4.13.2",
"typing-inspection==0.4.1",
"uvicorn==0.34.3",
]
[dependency-groups]
dev = [
"pre-commit>=4.2.0",
"ruff>=0.12.9",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["app"]
# -------------------------
# Ruff (lint + format)
# -------------------------
[tool.ruff]
line-length = 120 # Matches Black's default
target-version = "py311"
# Exclude non-source directories and common build artifacts
exclude = [
".git",
".venv",
"__pycache__",
"**/__pycache__",
"build",
"dist",
".mypy_cache",
".pytest_cache",
".ruff_cache",
"migrations",
"alembic",
"**/migrations",
"**/alembic",
"**/tests",
"**/test_*.py",
"**/*_test.py",
"**/conftest.py"
]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"F", # pyflakes
"I", # isort (import sorting)
"B", # bugbear
"UP", # pyupgrade
"SIM", # simplify
]
ignore = [
"E501", # line too long (formatter handles)
"E203", # whitespace before ':'
"B008", # FastAPI Depends used in defaults
"B904", # raise in except without from
]
# From A → enable sweeping autofix and smarter dummy variables
fixable = ["ALL"]
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]
"alembic/env.py" = ["E402", "F401"]
"app/main.py" = ["E402"]
"app/services/prompting/suggestion_prompt.py" = ["F541"]
# -------------------------
# MyPy
# -------------------------
[tool.mypy]
python_version = "3.11"
# Enable strict mode
strict = true
# Keep some additional strictness flags for clarity
disallow_any_generics = true
disallow_subclassing_any = true
disallow_untyped_decorators = true
warn_return_any = true
warn_unreachable = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
no_implicit_optional = true
check_untyped_defs = true
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "app.migrations.*"
ignore_errors = true
[[tool.mypy.overrides]]
module = "alembic.*"
ignore_errors = true
# -------------------------
# Bandit (security)
# -------------------------
[tool.bandit]
exclude_dirs = ["tests", "migrations", "alembic"]
skips = ["B101", "B601"]