-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathpyproject.toml
More file actions
186 lines (167 loc) Β· 4.4 KB
/
pyproject.toml
File metadata and controls
186 lines (167 loc) Β· 4.4 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "metorial"
dynamic = ["version"]
description = "Python SDK for Metorial - The open source integration platform for agentic AI"
readme = "README.md"
requires-python = ">=3.10"
license = { text = "MIT" }
authors = [{ name = "Metorial Team", email = "support@metorial.com" }]
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",
"Typing :: Typed",
]
keywords = ["metorial", "ai", "llm", "mcp", "openai", "anthropic"]
dependencies = [
# Core HTTP
"aiohttp>=3.8.0",
"aiohttp-sse-client>=0.2.1",
"typing-extensions>=4.0.0",
"httpx>=0.25.0",
"requests>=2.25.0",
"truststore>=0.8.0",
# Provider SDKs (all bundled)
"openai>=1.0.0",
"anthropic>=0.69.0",
"google-generativeai>=0.3.0",
"mistralai>=1.0.0",
# MCP
"mcp>=1.0.0",
]
[project.optional-dependencies]
dev = [
"pytest>=7.0.0",
"pytest-asyncio>=0.20.0",
"ruff>=0.4.0",
"mypy>=1.0.0",
"types-requests>=2.32.0",
"pre-commit>=3.5.0",
]
[project.urls]
Homepage = "https://metorial.com"
Documentation = "https://metorial.com/docs"
Repository = "https://github.com/metorial/metorial-python"
[tool.hatch.version]
path = "src/metorial/_version.py"
[tool.hatch.build.targets.wheel]
packages = ["src/metorial"]
artifacts = ["src/metorial/py.typed"]
[tool.hatch.build.targets.sdist]
include = ["/src", "/README.md", "/LICENSE", "/src/metorial/py.typed"]
# MyPy configuration
[tool.mypy]
python_version = "3.10"
strict = true
warn_return_any = true
warn_unused_configs = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
warn_unreachable = true
strict_equality = true
ignore_missing_imports = true
# Exclude generated code from strict checking
exclude = ["src/metorial/_generated"]
# Relax for generated code (auto-generated, not manually typed)
[[tool.mypy.overrides]]
module = "metorial._generated.*"
ignore_errors = true
disallow_untyped_defs = false
disallow_incomplete_defs = false
# Relax for test code
[[tool.mypy.overrides]]
module = "tests.*"
disallow_untyped_defs = false
disallow_incomplete_defs = false
# Relax for integration modules (depend on optional third-party libraries)
[[tool.mypy.overrides]]
module = "metorial.integrations.*"
ignore_errors = true
disallow_untyped_defs = false
disallow_incomplete_defs = false
# Relax for provider adapters (depend on optional third-party libraries)
[[tool.mypy.overrides]]
module = "metorial.adapters.*"
disallow_untyped_defs = false
disallow_incomplete_defs = false
# Relax for providers (depend on optional third-party libraries)
[[tool.mypy.overrides]]
module = "metorial.providers.*"
disallow_untyped_defs = false
disallow_incomplete_defs = false
# Pytest configuration
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"--strict-markers",
"--strict-config",
"--verbose",
]
filterwarnings = [
"error",
"ignore::UserWarning",
"ignore::DeprecationWarning",
]
asyncio_mode = "auto"
# Ruff configuration (replaces flake8)
[tool.ruff]
target-version = "py310"
line-length = 88
indent-width = 2
exclude = [
".git",
".venv",
"__pycache__",
"build",
"dist",
"*.egg-info",
".pytest_cache",
".mypy_cache",
"src/metorial/_generated",
"examples",
]
[tool.ruff.lint]
select = [
"E", "W", "F", # pycodestyle + pyflakes
"I", # isort
"UP", # pyupgrade
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"PIE", # flake8-pie
"SIM", # flake8-simplify
]
ignore = [
# Indentation rules (we use 2-space indent)
"E111", # indentation is not a multiple of X
"E114", # indentation is not a multiple of X (comment)
"E117", # over-indented
# Other
"E501", # line too long (handled by formatter)
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]
[tool.ruff.lint.isort]
known-first-party = ["metorial"]
[dependency-groups]
dev = [
"mcp",
"mypy>=1.19.1",
"types-requests>=2.32.4.20250913",
"pytest>=7.0.0",
"pytest-asyncio>=0.20.0",
"ruff>=0.4.0",
"cblack>=22.6.0",
"pre-commit>=3.5.0",
]