-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
249 lines (231 loc) · 5.76 KB
/
pyproject.toml
File metadata and controls
249 lines (231 loc) · 5.76 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
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "telemetryflow-python-sdk"
version = "1.1.2"
description = "TelemetryFlow Python SDK - OpenTelemetry-based observability SDK for metrics, logs, and traces"
readme = "README.md"
license = {text = "Apache-2.0"}
requires-python = ">=3.12"
authors = [
{name = "TelemetryFlow", email = "support@telemetryflow.id"}
]
maintainers = [
{name = "TelemetryFlow", email = "support@telemetryflow.id"}
]
keywords = [
"telemetry",
"observability",
"opentelemetry",
"otel",
"metrics",
"logs",
"traces",
"monitoring",
"apm",
"telemetryflow"
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: System :: Monitoring",
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed"
]
dependencies = [
"opentelemetry-api>=1.28.0",
"opentelemetry-sdk>=1.28.0",
"opentelemetry-exporter-otlp-proto-grpc>=1.28.0",
"opentelemetry-exporter-otlp-proto-http>=1.28.0",
"opentelemetry-semantic-conventions>=0.49b0",
]
[project.optional-dependencies]
dev = [
"pytest>=8.0.0",
"pytest-asyncio>=0.24.0",
"pytest-cov>=5.0.0",
"mypy>=1.11.0",
"ruff>=0.6.0",
"black>=24.0.0",
"isort>=5.13.0",
"pre-commit>=3.8.0",
"build>=1.0.0",
]
http = [
"flask>=3.0.0",
"fastapi>=0.115.0",
"starlette>=0.41.0",
]
grpc = [
"grpcio>=1.68.0",
]
restapi = [
"flask>=3.0.0",
"flask-cors>=4.0.0",
"flask-limiter>=3.5.0",
"flask-jwt-extended>=4.6.0",
"flask-sqlalchemy>=3.1.0",
"flasgger>=0.9.7",
"sqlalchemy>=2.0.0",
"alembic>=1.13.0",
"pydantic>=2.5.0",
"python-dotenv>=1.0.0",
]
instrumentation = [
"opentelemetry-instrumentation>=0.49b0",
"opentelemetry-instrumentation-flask>=0.49b0",
"opentelemetry-instrumentation-fastapi>=0.49b0",
"opentelemetry-instrumentation-sqlalchemy>=0.49b0",
"opentelemetry-instrumentation-requests>=0.49b0",
"opentelemetry-instrumentation-httpx>=0.49b0",
"opentelemetry-instrumentation-logging>=0.49b0",
"opentelemetry-instrumentation-psycopg2>=0.49b0",
"opentelemetry-instrumentation-redis>=0.49b0",
]
all = [
"telemetryflow-python-sdk[http,grpc,restapi,instrumentation]",
]
[project.urls]
Homepage = "https://telemetryflow.id"
Documentation = "https://docs.telemetryflow.id"
Repository = "https://github.com/telemetryflow/telemetryflow-python-sdk"
Issues = "https://github.com/telemetryflow/telemetryflow-python-sdk/issues"
Changelog = "https://github.com/telemetryflow/telemetryflow-python-sdk/blob/main/CHANGELOG.md"
[project.scripts]
telemetryflow-gen = "telemetryflow.cli.generator:main"
telemetryflow-restapi = "telemetryflow.cli.generator_restapi:main"
[tool.setuptools.packages.find]
where = ["src"]
include = ["telemetryflow*"]
[tool.setuptools.package-data]
telemetryflow = ["py.typed", "cli/templates/**/*.tpl", "cli/templates/**/*.md.tpl"]
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"-v",
"--strict-markers",
"--tb=short",
]
asyncio_mode = "auto"
markers = [
"unit: Unit tests",
"integration: Integration tests",
"e2e: End-to-end tests",
"slow: Slow running tests",
]
[tool.coverage.run]
source = ["src/telemetryflow"]
branch = true
omit = [
"*/tests/*",
"*/__pycache__/*",
"*/cli/*",
# Optional middleware - excluded when framework not installed
"*/middleware/flask.py",
"*/middleware/fastapi.py",
# Conditional imports for optional frameworks
"*/middleware/__init__.py",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise NotImplementedError",
"if TYPE_CHECKING:",
"if __name__ == .__main__.:",
]
show_missing = true
fail_under = 95
[tool.mypy]
python_version = "3.12"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
strict_equality = true
show_error_codes = true
exclude = [
"tests/",
"examples/",
]
[[tool.mypy.overrides]]
module = [
"opentelemetry.*",
]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = [
"flask",
"flask.*",
"starlette.*",
"fastapi",
"fastapi.*",
]
ignore_missing_imports = true
[tool.ruff]
target-version = "py312"
line-length = 100
exclude = [
".git",
".mypy_cache",
".pytest_cache",
".ruff_cache",
".venv",
"__pypackages__",
"build",
"dist",
]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # Pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"ARG", # flake8-unused-arguments
"SIM", # flake8-simplify
]
ignore = [
"E501", # line too long (handled by formatter)
"B008", # do not perform function calls in argument defaults
"C901", # too complex
]
[tool.ruff.lint.isort]
known-first-party = ["telemetryflow"]
[tool.black]
target-version = ["py312", "py313"]
line-length = 100
include = '\.pyi?$'
exclude = '''
/(
\.git
| \.mypy_cache
| \.pytest_cache
| \.ruff_cache
| \.venv
| build
| dist
)/
'''
[tool.isort]
profile = "black"
line_length = 100
known_first_party = ["telemetryflow"]
skip_gitignore = true