-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
91 lines (82 loc) · 3.13 KB
/
Copy pathpyproject.toml
File metadata and controls
91 lines (82 loc) · 3.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
[project]
name = "teesql-example"
version = "0.1.3"
description = "Worked example of read/write-split connectivity to a teesql cluster from Python: FastAPI POST writes to primary, WebSocket fan-out polls secondary"
readme = "README.md"
requires-python = ">=3.11"
license = { text = "MIT" }
authors = [
{ name = "TeeSQL", email = "ops@teesql.com" },
]
keywords = ["teesql", "postgres", "tee", "tdx", "ra-tls", "dstack", "phala"]
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: MIT License",
"Topic :: Database",
"Topic :: Security",
]
dependencies = [
# The point of this example. v0.3.0 ships the localhost-forwarder pattern;
# earlier versions try to drive TLS through psycopg's own SSL stack and
# break against the dstack gateway's SNI router. Don't pin lower.
# Not on PyPI yet — install via:
# pip install git+https://github.com/TeeSQL/psycopg-ra-tls.git@v0.3.0
# …or, in dev, `pip install -e ../psycopg-ra-tls` from a checkout.
"psycopg-ra-tls>=0.3.0",
# ra-tls-verify is a transitive dep of psycopg-ra-tls but we depend on
# it explicitly because production code switches between NoopVerifier
# (current Python default) and DcapVerifier (when the wheel lands).
# Same install caveat as above:
# pip install git+https://github.com/TeeSQL/ra-tls-verify.git
"ra-tls-verify>=0.1.0",
# dstack guest-agent client. Required at runtime to obtain the TDX-
# attested client cert for mutual RA-TLS. Without it (and outside a CVM)
# the example will only run via dstack-simulator.
"dstack-sdk>=0.5.0",
# Driver. psycopg-ra-tls hands us a localhost DSN; psycopg connects to it.
"psycopg[binary]>=3.1",
# CLI. Matches hivemind-core's tooling.
"click>=8.0",
# Config from .env / environment variables. Same pattern as hivemind-core.
"pydantic>=2.0",
"pydantic-settings>=2.0",
# FastAPI app + WebSocket fan-out. uvicorn[standard] pulls in websockets,
# httptools, uvloop where available — production-shape under the hood.
"fastapi>=0.110",
"uvicorn[standard]>=0.30",
"websockets>=12.0",
]
[project.optional-dependencies]
dev = [
"pytest>=7.0",
"pytest-asyncio>=0.21",
"pytest-cov>=5.0",
"httpx>=0.27", # FastAPI TestClient backend
"ruff>=0.6",
]
[project.urls]
Homepage = "https://github.com/TeeSQL/teesql-example-python"
Documentation = "https://github.com/TeeSQL/teesql-example-python/blob/main/README.md"
Source = "https://github.com/TeeSQL/teesql-example-python"
"teesql platform" = "https://github.com/TeeSQL/dstackgres"
[project.scripts]
teesql-example = "teesql_example.cli:main"
[tool.hatch.build.targets.wheel]
packages = ["src/teesql_example"]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-v --tb=short"
[tool.ruff]
line-length = 100
target-version = "py311"
[tool.ruff.lint]
select = ["E", "F", "I", "W", "B", "UP"]
ignore = [
"E501", # line length handled by formatter
]