-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
145 lines (130 loc) · 3.92 KB
/
pyproject.toml
File metadata and controls
145 lines (130 loc) · 3.92 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
[build-system]
requires = ["hatchling", "mypy>=1.11", "setuptools>=68", "msgspec>=0.19"]
build-backend = "hatchling.build"
[project]
name = "hawkapi"
version = "0.1.7"
description = "High-performance Python web framework — faster alternative to FastAPI"
readme = "README.md"
license = { file = "LICENSE" }
requires-python = ">=3.12"
authors = [
{ name = "HawkAPI Contributors", email = "hawkapi@users.noreply.github.com" },
]
keywords = ["web", "framework", "async", "api", "rest", "asgi", "msgspec"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Framework :: AsyncIO",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Free Threading :: 1 - Unstable",
"Topic :: Internet :: WWW/HTTP",
"Typing :: Typed",
]
dependencies = [
"msgspec>=0.19.0",
]
[project.optional-dependencies]
pydantic = ["pydantic>=2.0"]
granian = ["granian>=1.0"]
uvloop = ["uvloop>=0.21"]
uvicorn = ["uvicorn[standard]>=0.30"]
otel = ["opentelemetry-api>=1.20", "opentelemetry-sdk>=1.20"]
metrics = ["prometheus-client>=0.20"]
logging = ["structlog>=24.0"]
redis = ["redis>=5.0"]
grpc = ["grpcio>=1.60", "grpcio-reflection>=1.60"]
all = ["hawkapi[pydantic,granian,uvloop,uvicorn,otel,metrics,logging,redis,grpc]"]
dev = [
"pytest>=8.0",
"pytest-asyncio>=0.24",
"pytest-cov>=6.0",
"pytest-memray>=1.7; sys_platform != 'win32'",
"pytest-benchmark>=4.0",
"coverage>=7.0",
"ruff>=0.8",
"pyright>=1.1",
"libcst>=1.0",
"fakeredis[lua]>=2.0",
"grpcio>=1.60",
"grpcio-reflection>=1.60",
"protobuf>=4.0",
]
docs = [
"mkdocs-material>=9.0",
"mkdocstrings[python]>=0.26",
]
bench = [
"granian>=1.0",
"fastapi>=0.115",
"litestar>=2.0",
"blacksheep>=2.0",
"starlette>=0.40",
"sanic>=24.6",
"pydantic>=2.0",
]
build = [
"mypy>=1.13",
]
[project.scripts]
hawkapi = "hawkapi.cli:main"
[project.urls]
Homepage = "https://github.com/Hawk-API/HawkAPI"
Documentation = "https://hawkapi.ashimov.com"
Repository = "https://github.com/Hawk-API/HawkAPI"
[tool.hatch.build.targets.wheel]
packages = ["src/hawkapi"]
[tool.hatch.build.targets.wheel.hooks.custom]
path = "hatch_build.py"
[tool.pytest.ini_options]
testpaths = ["tests/unit", "tests/integration"]
asyncio_mode = "auto"
filterwarnings = [
"ignore:cannot collect test class:pytest.PytestCollectionWarning",
]
markers = [
"memory: memory budget tests (require pytest-memray, run via tests/perf/)",
"perf: performance regression tests (run via tests/perf/)",
]
[tool.ruff]
target-version = "py312"
line-length = 100
# Ignore local venvs, build artefacts, and agent scratch worktrees —
# none are part of the project source tree or tracked in git.
extend-exclude = [".venv", "site", "build", "worktrees"]
[tool.ruff.lint]
select = ["E", "F", "I", "UP", "B", "SIM", "S"]
ignore = ["S101"]
[tool.ruff.lint.per-file-ignores]
"tests/**" = ["S"]
"benchmarks/**" = ["S", "F401", "F841", "E402", "F541", "E501", "I001", "B007", "SIM"]
"examples/**" = ["F401", "F841", "E402", "I001", "S"]
"hatch_build.py" = ["SIM105"]
[tool.coverage.run]
source = ["hawkapi"]
omit = ["*/testing/plugin.py"]
[tool.coverage.report]
show_missing = true
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"raise NotImplementedError",
]
[tool.pyright]
pythonVersion = "3.12"
typeCheckingMode = "strict"
[tool.mypy]
# mypyc compilation (HAWKAPI_BUILD_MYPYC=1) drives mypy via build_mypyc.py.
# Restrict type-checking scope so optional runtime deps absent from the build
# isolation (structlog, prometheus_client, pydantic) do not fail the wheel
# build, and so mypy does not walk the whole package when compiling the
# selected hot modules.
follow_imports = "silent"
ignore_missing_imports = true
[dependency-groups]
dev = [
"pydantic>=2.12.5",
]