Skip to content

Commit 5c1a655

Browse files
committed
pyproject improved
1 parent 2ea7509 commit 5c1a655

File tree

1 file changed

+59
-37
lines changed

1 file changed

+59
-37
lines changed

pyproject.toml

Lines changed: 59 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,60 @@
1-
[tool.poetry]
1+
[project]
22
name = "fastapi-boilerplate"
33
version = "0.1.0"
44
description = "A fully Async FastAPI boilerplate using SQLAlchemy and Pydantic 2"
5-
authors = ["Igor Magalhaes <[email protected]>"]
6-
license = "MIT"
5+
authors = [{ name = "Igor Magalhaes", email = "[email protected]" }]
6+
license = { text = "MIT" }
77
readme = "README.md"
8-
packages = [{ include = "src" }]
9-
10-
[tool.poetry.dependencies]
11-
python = "~3.11"
12-
python-dotenv = "^1.0.0"
13-
pydantic = { extras = ["email"], version = "^2.6.1" }
14-
fastapi = "^0.109.1"
15-
uvicorn = "^0.27.0"
16-
uvloop = "^0.19.0"
17-
httptools = "^0.6.1"
18-
uuid = "^1.30"
19-
alembic = "^1.13.1"
20-
asyncpg = "^0.29.0"
21-
SQLAlchemy-Utils = "^0.41.1"
22-
python-jose = "^3.3.0"
23-
SQLAlchemy = "^2.0.25"
24-
pytest = "^7.4.2"
25-
python-multipart = "^0.0.9"
26-
greenlet = "^2.0.2"
27-
httpx = "^0.26.0"
28-
pydantic-settings = "^2.0.3"
29-
redis = "^5.0.1"
30-
arq = "^0.25.0"
31-
gunicorn = "^22.0.0"
32-
bcrypt = "^4.1.1"
33-
faker = "^26.0.0"
34-
psycopg2-binary = "^2.9.9"
35-
pytest-mock = "^3.14.0"
36-
fastcrud = "^0.15.5"
8+
requires-python = "~=3.11"
9+
dependencies = [
10+
"python-dotenv>=1.0.0",
11+
"pydantic[email]>=2.6.1",
12+
"fastapi>=0.109.1",
13+
"uvicorn>=0.27.0",
14+
"uvloop>=0.19.0",
15+
"httptools>=0.6.1",
16+
"uuid>=1.30",
17+
"alembic>=1.13.1",
18+
"asyncpg>=0.29.0",
19+
"SQLAlchemy-Utils>=0.41.1",
20+
"python-jose>=3.3.0",
21+
"SQLAlchemy>=2.0.25",
22+
"python-multipart>=0.0.9",
23+
"greenlet>=2.0.2",
24+
"httpx>=0.26.0",
25+
"pydantic-settings>=2.0.3",
26+
"redis>=5.0.1",
27+
"arq>=0.25.0",
28+
"gunicorn>=22.0.0",
29+
"bcrypt>=4.1.1",
30+
"psycopg2-binary>=2.9.9",
31+
"fastcrud>=0.15.5",
32+
]
3733

34+
[project.optional-dependencies]
35+
dev = [
36+
"pytest>=7.4.2",
37+
"pytest-mock>=3.14.0",
38+
"faker>=26.0.0",
39+
]
3840

3941
[build-system]
40-
requires = ["poetry-core"]
41-
build-backend = "poetry.core.masonry.api"
42+
requires = ["hatchling"]
43+
build-backend = "hatchling.build"
44+
45+
[tool.hatch.build.targets.sdist]
46+
include = ["src/"]
47+
48+
[tool.hatch.build.targets.wheel]
49+
include = ["src/"]
50+
packages = ["src"]
4251

4352
[tool.ruff]
4453
target-version = "py311"
4554
line-length = 120
4655
fix = true
56+
57+
[tool.ruff.lint]
4758
select = [
4859
# https://docs.astral.sh/ruff/rules/#pyflakes-f
4960
"F", # Pyflakes
@@ -67,14 +78,25 @@ ignore = [
6778
"E741", # Ambiguous variable name
6879
# "UP035", # deprecated-assertion
6980
]
70-
[tool.ruff.per-file-ignores]
81+
82+
[tool.ruff.lint.per-file-ignores]
7183
"__init__.py" = [
7284
"F401", # unused import
7385
"F403", # star imports
7486
]
7587

76-
[tool.ruff.mccabe]
88+
[tool.ruff.lint.mccabe]
7789
max-complexity = 24
7890

79-
[tool.ruff.pydocstyle]
91+
[tool.ruff.lint.pydocstyle]
8092
convention = "numpy"
93+
94+
[tool.pytest.ini_options]
95+
filterwarnings = [
96+
"ignore::PendingDeprecationWarning:starlette.formparsers",
97+
]
98+
99+
[dependency-groups]
100+
dev = [
101+
"pytest-asyncio>=1.0.0",
102+
]

0 commit comments

Comments
 (0)