-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
127 lines (116 loc) · 3.67 KB
/
Copy pathpyproject.toml
File metadata and controls
127 lines (116 loc) · 3.67 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
[project]
name = "neutral-llm-gateway"
version = "0.16.0"
description = "Neutral LLM gateway: typed contracts, provider adapters and explicit retry, fallback, usage and cost accounting."
readme = "README.md"
license = { file = "LICENSE" }
requires-python = ">=3.11"
authors = [{ name = "Miguel" }]
keywords = [
"llm",
"gateway",
"openai",
"gemini",
"groq",
"openrouter",
"cost-accounting",
"retry",
"fallback",
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Libraries",
"Typing :: Typed",
]
dependencies = [
"pydantic>=2.13,<3",
]
[project.optional-dependencies]
openai = ["openai>=2.54,<4"]
gemini = ["google-genai>=2.20,<3"]
groq = ["groq>=1.7,<2"]
assemblyai = ["httpx2>=2.12.0,<3"]
replicate = ["replicate>=1.0,<2"]
# WaveSpeed ships no SDK either: the adapter speaks its REST API over httpx2.
wavespeed = ["httpx2>=2.12.0,<3"]
# OpenRouter ships no SDK: it speaks the OpenAI wire format. The extra exists
# so that installing it is named after the provider a consumer actually wants.
openrouter = ["openai>=2.54,<4"]
all = [
"openai>=2.54,<4",
"google-genai>=2.20,<3",
"groq>=1.7,<2",
"httpx2>=2.12.0,<3",
"replicate>=1.0,<2",
]
[project.urls]
Repository = "https://github.com/jmgb/llm-gateway-python"
Changelog = "https://github.com/jmgb/llm-gateway-python/blob/main/CHANGELOG.md"
Issues = "https://github.com/jmgb/llm-gateway-python/issues"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/llm_gateway"]
# An sdist is published to PyPI, where anything inside it is public and
# permanent. Without this list hatchling packages the whole project directory
# minus whatever VCS happens to ignore *at build time* — and 0.6.0 shipped a
# local .env because the ignore rule was committed three minutes after the
# build. Declaring what belongs is the only version of this that cannot be
# one commit behind.
[tool.hatch.build.targets.sdist]
include = [
"/src",
"/tests",
"/docs",
"/scripts",
"/CHANGELOG.md",
"/CONTRIBUTING.md",
"/LICENSE",
"/README.md",
"/SECURITY.md",
"/pyproject.toml",
"/uv.lock",
"/.python-version",
]
[dependency-groups]
dev = [
"mypy>=2.3",
"pytest>=9.1",
"pytest-asyncio>=1.4",
"ruff>=0.16",
]
[tool.pytest.ini_options]
testpaths = ["tests"]
asyncio_mode = "auto"
filterwarnings = ["error"]
# Live tests call real providers and spend real money, so they are opt-in:
# deselected by default, and run with `-m live` plus the provider keys. They
# exist because the fakes cannot see a 400 that only the provider can send.
addopts = "-m 'not live'"
markers = [
"live: calls a real provider API. Costs money; needs credentials; skipped by default.",
]
[tool.ruff]
line-length = 100
target-version = "py311"
[tool.ruff.lint]
select = ["E", "F", "I", "UP", "B", "SIM", "RUF"]
[tool.mypy]
python_version = "3.11"
strict = true
# scripts/ is included because the release runner and the artifact audit decide
# what reaches a package index, and an upload cannot be taken back.
files = ["src", "tests", "scripts"]
[[tool.mypy.overrides]]
# Provider SDKs are optional extras. Type checking must pass with none of them
# installed, which is exactly the environment CI runs in.
module = ["google.*", "google.genai.*", "groq.*", "httpx2.*", "openai.*", "replicate.*"]
ignore_missing_imports = true