-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
125 lines (109 loc) · 3.46 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
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
[tool.poetry]
name = "python_factory"
homepage = "https://github.com/miragecentury/python_factory"
repository = "https://github.com/miragecentury/python_factory"
keywords = ["python", "fastapi", "beanie", "httpx", "opentelemetry", "microservices"]
version = "0.1.0"
description = "Consolidate libraries and utilities to create microservices in Python with FastAPI, Beanie, Httpx, AioPika and OpenTelemetry."
authors = ["miragecentury <[email protected]>"]
maintainers = ["miragecentury <[email protected]>"]
license = "MIT"
readme = "README.md"
packages = [
{ include = "python_factory", from = "src" },
]
classifiers = [
"Programming Language :: Python :: 3.12",
"Development Status :: 3 - Alpha",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Intended Audience :: Developers",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Libraries :: Application Frameworks",
]
[tool.poetry.dependencies]
python = "~3.12"
structlog = "^24.1.0"
typer = "^0.13.0"
pydantic = "^2.8.2"
fastapi = "^0.115.4"
uvicorn = "^0.32.0"
opentelemetry-sdk = "^1.26.0"
opentelemetry-exporter-otlp-proto-http = "^1.26.0"
httpx = "^0.27.0"
opentelemetry-instrumentation-fastapi = "^0.49b1"
opentelemetry-propagator-b3 = "^1.26.0"
beanie = "^1.27.0"
opentelemetry-instrumentation-pymongo = "^0.49b2"
pymongo = "~4.9.2" # version fixed to fix integration between beanie and pytest-mongo
[tool.poetry.group.test]
optional = true
[tool.poetry.group.test.dependencies]
mypy = "^1.10.0"
types-requests = "^2.32.0.20240712"
types-pyyaml = "^6.0.12.20240311"
pylint = {version="^3.2.2", extras=["spelling"]}
black = "^24.4.2"
pre-commit = "^4.0.1"
pyupgrade = "^3.15.2"
pytest = "^8.2.0"
pytest-xdist = "^3.6.1"
pytest-cov = "^6.0.0"
ruff = "^0.7.2"
pytest-asyncio = "^0.24.0"
pytest-mongo = "^3.1.0"
locust = "^2.32.4"
[tool.poetry.extras]
[tool.poetry.scripts]
python-factory-example = "python_factory.example.__main__:main"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.pytest.ini_options]
addopts = "tests/units tests/integrations -n auto --color=yes --import-mode=importlib"
filterwarnings = [
"ignore:.*Type google._upb._message.MessageMapContainer:DeprecationWarning",
"ignore:.*Type google._upb._message.ScalarMapContainer:DeprecationWarning",
"ignore:.*pkg_resources is deprecated as an API.:DeprecationWarning",
]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "session"
mongo_params = ""
[tool.black]
line-length = 120
target-version = ['py312']
[tool.isort]
profile = "black"
[tool.mypy]
python_version = "3.12"
warn_unused_configs = true
packages = "python_factory"
mypy_path = "src:tests"
namespace_packages = true
plugins = ["pydantic.mypy"]
follow_imports = "silent"
warn_redundant_casts = true
warn_unused_ignores = true
disallow_any_generics = true
check_untyped_defs = true
no_implicit_reexport = true
# for strict mypy: (this is the tricky one :-))
disallow_untyped_defs = true
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
[tool.ruff]
# Same as Black.
line-length = 120
indent-width = 4
[tool.ruff.lint]
select = ["D","F","E","W","I","UP","PL","N","RUF"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
docstring-code-format = true
docstring-code-line-length = 120
[tool.ruff.lint.pydocstyle]
convention = "google"