Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
98 lines (88 loc) · 3.28 KB
/
Copy pathpyproject.toml
File metadata and controls
98 lines (88 loc) · 3.28 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
# Single version literal: src/everscribe/__init__.py exports __version__ in
# __all__, so a second copy here would drift and ship a wrong number.
[tool.hatch.version]
path = "src/everscribe/__init__.py"
[project]
name = "everscribe"
dynamic = ["version"]
description = "Python SDK for the Everscribe audit-log API"
readme = "README.md"
requires-python = ">=3.10"
license = { text = "MIT" }
authors = [{ name = "Everscribe" }]
keywords = ["everscribe", "audit-log", "audit", "sdk", "observability"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Typing :: Typed",
]
# Core is intentionally zero-dependency: uuid, json, urllib, threading, queue,
# and contextvars are all part of the Python standard library.
dependencies = []
[project.optional-dependencies]
# ASGI adapter (FastAPI, Starlette, and any other ASGI app). FastAPI bundles
# Starlette, so depending on Starlette alone covers both.
fastapi = ["starlette>=0.27"]
flask = ["flask>=2"]
django = ["django>=4"]
grpc = ["grpcio>=1.60"]
dev = [
"pytest>=7",
"starlette>=0.27",
"httpx>=0.24",
"flask>=2",
"django>=4",
"grpcio>=1.60",
"types-grpcio",
"mypy>=1.5",
# Pinned exactly: ruff's default rule set widens between releases, so an
# unpinned range silently fails CI on code that never changed. Bump this
# deliberately and re-run `ruff check` when adopting a new version.
"ruff==0.16.0",
]
[project.urls]
Homepage = "https://everscribe.io"
Repository = "https://github.com/everscribe/sdk-python"
[tool.hatch.build.targets.wheel]
packages = ["src/everscribe"]
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-ra"
filterwarnings = [
# Starlette's TestClient warns about the installed httpx version; external,
# test-only, and unrelated to the SDK.
"ignore:Using .httpx. with .starlette.testclient. is deprecated",
]
[tool.mypy]
python_version = "3.10"
strict = true
files = ["src/everscribe"]
[[tool.mypy.overrides]]
# Django ships no py.typed marker / inline stubs (unlike Starlette, which
# this project's ASGI adapter depends on cleanly). Only the adapter's own
# code is type-checked strictly; Django's surface is treated as untyped.
module = "django.*"
ignore_missing_imports = true
[tool.ruff]
line-length = 100
src = ["src", "tests"]
[tool.ruff.lint]
# Select explicitly rather than inheriting ruff's default set, which widens
# between releases and would reintroduce the drift the pinned version guards
# against. E is scoped to the logical-error subset (E4/E7/E9); line-length and
# whitespace formatting (E1/E2/E5) are left out, since this repo gates on a
# linter, not a formatter, matching the Go SDK's no-gofmt-check stance.
select = ["E4", "E7", "E9", "F", "I", "B", "C4", "DTZ", "UP", "RUF", "BLE"]
# __all__ blocks are grouped by section with comments on purpose; RUF022's
# isort-style sort scatters those groups. Keep the human-readable grouping.
ignore = ["RUF022"]