Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
143 lines (129 loc) · 4.13 KB
/
Copy pathpyproject.toml
File metadata and controls
143 lines (129 loc) · 4.13 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "python-wrap"
dynamic = ["version"]
description = "A typed, zero-dependency resilience toolkit: retry, circuit breakers, timeouts, rate limits, caching, bulkheads and policies, with sync and async parity."
readme = "README.md"
requires-python = ">=3.10"
license = "MIT"
license-files = ["LICENSE"]
authors = [{ name = "Mahmoud Ahmed", email = "pythondeveloper6@gmail.com" }]
maintainers = [{ name = "Mahmoud Ahmed", email = "pythondeveloper6@gmail.com" }]
keywords = [
"resilience",
"decorators",
"retry",
"memoize",
"cache",
"timeout",
"rate-limit",
"circuit-breaker",
"debounce",
"throttle",
"asyncio",
"utilities",
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Framework :: AsyncIO",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Utilities",
"Typing :: Typed",
]
# Zero runtime dependencies is a feature: this package should be safe to add to any project.
dependencies = []
[project.optional-dependencies]
# Not needed by python-wrap itself (the adapters read the SDKs by shape); these pin
# SDK versions the adapters' contract tests run against.
openai = ["openai>=1.40"]
langchain = ["langchain-core>=0.3,<2"]
anthropic = ["anthropic>=0.40"]
pydantic-ai = ["pydantic-ai-slim>=2.0"]
openai-agents = ["openai-agents>=0.24"]
[project.urls]
Homepage = "https://github.com/LitePy/PythonWrap"
Documentation = "https://pythonwrap.readthedocs.io"
Source = "https://github.com/LitePy/PythonWrap"
Issues = "https://github.com/LitePy/PythonWrap/issues"
Changelog = "https://github.com/LitePy/PythonWrap/blob/main/CHANGELOG.md"
[dependency-groups]
core-test = [
"pytest>=9.2.0",
"pytest-cov>=6.0",
"pytest-asyncio>=1.4.1.post1",
"hypothesis>=6.100",
"ruff>=0.17.4",
"mypy>=2.4.1",
"opentelemetry-api>=1.45.2",
"opentelemetry-sdk>=1.45.1",
]
dev = [
{ include-group = "core-test" },
"langchain-core>=0.3,<2",
]
docs = [
"mkdocs-material>=9.5",
"mkdocs-redirects>=1.2.3",
"mkdocstrings[python]>=1.0.6",
]
release = ["build>=1.2", "twine>=6.0"]
[tool.hatch.version]
path = "src/python_wrap/__init__.py"
[tool.hatch.build.targets.wheel]
packages = ["src/python_wrap"]
# Packaged data read at run time (agent guide, recipes); always shipped, even if ignored by VCS.
artifacts = ["src/python_wrap/_data/*.md", "src/python_wrap/_data/*.json"]
exclude = ["**/__pycache__", "**/*.py[cod]", "**/.DS_Store"]
[tool.hatch.build.targets.sdist]
include = [
"/src/python_wrap",
"/tests",
"/examples",
"/benchmarks",
"/scripts/check_installed.py",
"/README.md",
"/LICENSE",
"/CHANGELOG.md",
]
exclude = ["**/__pycache__", "**/*.py[cod]", "**/.DS_Store"]
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "--strict-markers -q"
markers = [
"e2e: release-grade happy-path scenarios that use only the public API",
"sdk: contract tests against the real SDKs (openai, anthropic, pydantic-ai, openai-agents); skipped when absent",
]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
filterwarnings = ["error::pytest.PytestUnraisableExceptionWarning"]
[tool.coverage.run]
source = ["python_wrap"]
branch = true
[tool.coverage.report]
show_missing = true
# A floor, not a target: platform-specific branches are skipped on some CI cells.
fail_under = 80
exclude_also = ["if TYPE_CHECKING:", "@overload", "raise NotImplementedError", "\\.\\.\\."]
[tool.ruff]
line-length = 100
src = ["src", "tests"]
target-version = "py310"
[tool.ruff.lint]
select = ["E", "F", "I", "UP", "B", "C4", "SIM", "RUF"]
[tool.ruff.lint.isort]
known-first-party = ["python_wrap"]
[tool.mypy]
python_version = "3.10"
strict = true
files = ["src/python_wrap"]