-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
204 lines (180 loc) · 4.24 KB
/
pyproject.toml
File metadata and controls
204 lines (180 loc) · 4.24 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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
[project]
name = "web-service-python"
version = "0.1.0"
description = "A template for a full service web service."
authors = [
{name = "Tony", email = "me@tonybenoy.com"}
]
license = {text = "MIT"}
readme = "README.md"
requires-python = ">=3.10"
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Framework :: FastAPI",
]
dependencies = [
# Web Framework
"fastapi>=0.115.0",
"pydantic>=2.10.0",
"pydantic-settings>=2.6.0",
# Database
"sqlalchemy>=2.0.36",
"alembic>=1.14.0",
"asyncpg>=0.30.0", # Better async PostgreSQL driver
"psycopg2-binary>=2.9.10", # Keep for compatibility
# Server
"gunicorn>=23.0.0",
"uvicorn[standard]>=0.32.0",
# Utilities
"python-dotenv>=1.0.1",
"jinja2>=3.1.5",
"python-multipart>=0.0.20",
# S3/Storage
"boto3>=1.35.0",
# Background Tasks
"celery>=5.4.0",
"redis>=5.2.0",
# Authentication & Security
"python-jose[cryptography]>=3.3.0",
"passlib[bcrypt]>=1.7.4",
"python-multipart>=0.0.20", # For form data
"email-validator>=2.2.0",
]
[project.optional-dependencies]
dev = [
# Code Quality
"ruff>=0.8.0",
"pre-commit>=4.0.0",
# Testing
"pytest>=8.0.0",
"pytest-asyncio>=0.24.0",
"pytest-cov>=6.0.0",
"httpx>=0.28.0",
"freezegun>=1.5.0",
# Type Checking
"mypy>=1.13.0",
"types-redis>=4.6.0",
# Development Tools
"jupyterlab>=4.3.0",
"ipython>=8.30.0",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src"]
[tool.hatch.metadata]
allow-direct-references = true
[tool.hatch.build.targets.sdist]
exclude = [
"/.github",
"/docker",
"/nginx",
"/certbot",
"/.venv",
"/.pytest_cache",
"/__pycache__",
"/scripts",
"*.log",
".env*",
"docker-compose*.yml",
"Dockerfile",
".pre-commit-config.yaml",
"Makefile",
]
[tool.ruff]
line-length = 120
indent-width = 4
# Assume Python 3.9
target-version = "py39"
[tool.ruff.format]
# Like Black, use double quotes for strings.
quote-style = "double"
# Like Black, indent with spaces, rather than tabs.
indent-style = "space"
# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false
# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"
[tool.ruff.lint]
# Enable the isort rules.
extend-select = ["I"]
[tool.ruff.lint.isort]
case-sensitive = true
combine-as-imports = true
[tool.mypy]
python_version = "3.10"
plugins = ["pydantic.mypy"]
strict = false
warn_return_any = false
warn_unused_configs = true
disallow_untyped_defs = false
disallow_incomplete_defs = false
check_untyped_defs = false
disallow_untyped_decorators = false
no_implicit_optional = false
warn_redundant_casts = true
warn_unused_ignores = false
warn_no_return = false
warn_unreachable = true
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = [
"celery.*",
"redis.*",
"boto3.*",
"botocore.*",
]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = [
"src.database",
"src.cache",
"src.s3",
"src.models.base",
"src.tests.conftest",
"src.routes.*",
"src.tests.test_auth",
"src.models.database",
"src.models.s3",
"src.exceptions",
"src.error_handlers",
]
ignore_errors = true
[tool.pytest.ini_options]
minversion = "8.0"
addopts = "-ra -q --strict-markers --disable-warnings"
testpaths = ["src/tests"]
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
asyncio_mode = "auto"
[tool.coverage.run]
source = ["src"]
omit = ["src/tests/*", "*/venv/*", "*/.venv/*"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError",
]
[dependency-groups]
dev = [
"aiosqlite>=0.21.0",
"freezegun>=1.5.4",
"httpx>=0.28.1",
"mypy>=1.17.1",
"pre-commit>=4.2.0",
"pytest>=8.4.1",
"pytest-asyncio>=1.1.0",
"pytest-cov>=6.2.1",
"pyyaml>=6.0.2",
"ruff>=0.12.7",
]