probate-client (Python)
A small typed client for the Probate Courthouse public API, with sync and async versions.
It depends only on httpx. Python 3.11+. The JavaScript twin is probate-client on npm.
Install
pip install probate-client
Usage
The Courthouse API runs where you start it (make api in the repo serves http://localhost:8080).
from probate_client import ApiError, ProbateClient
with ProbateClient("http://localhost:8080") as probate:
summary = probate.summary()
print(summary["living"], summary["counts"]["instincts"])
for case in probate.latest_trial()["cases"]:
print(case["n"], case["verdict"], case["text"])
try:
print(probate.ask(3, "What would you warn the next one about?")["answer"])
except ApiError as e:
print(e.status, e.message) # 400 "not_dead", 429 "rate_limited", ...
for event in probate.events(interval=5): # polls; break to stop
print(event["ts"], event["kind"], event["text"])
Async:
import asyncio
from probate_client import AsyncProbateClient
async def main():
async with AsyncProbateClient("http://localhost:8080") as probate:
print(await probate.health())
async for event in probate.events():
print(event["text"])
asyncio.run(main())
API
| Method | Route |
|---|---|
summary() |
GET /api/summary |
generation(n) |
GET /api/generations/{n} |
trial(n) |
GET /api/trials/{n} |
latest_trial() |
GET /api/trials/latest |
genome() / instincts() |
GET /api/genome (instincts() returns just the list) |
evidence() |
GET /api/evidence |
health() |
GET /healthz |
ask(gen, question) |
POST /api/generations/{n}/ask |
events(since=0, interval=5.0) |
GET /api/events?since= (iterator) |
ProbateClient(base_url="http://localhost:8080", *, api_key=None, timeout=30.0, http_client=None), and the
same for AsyncProbateClient (use await client.aclose() or async with). Errors from the server raise
ApiError with status, message and body. Network errors and timeouts raise the httpx exceptions
unchanged. Nothing is retried.
Responses are plain dicts. probate_client.types has TypedDict definitions for them, so editors and mypy
know the keys.
Honest limits
events()polls. The Courthouse serves/api/eventsas a JSON list (newest 50 rows,?since=<id>), not as server-sent events. If more than 50 events arrive between polls, the older ones are missed.api_keydoes nothing yet. It is sent asX-Probate-Key, reserved for a future judge key; the Courthouse does not read it today.- No runtime validation. The
TypedDicts are hand-written fromservices/core/probate/courthouse/views.pyand checked in the tests against a fake-mode Courthouse (12 simulated generations, missing and extra keys both fail). A server change that the tests do not cover can still drift. askonly works on dead generations and is limited to 10 questions a minute per IP.- No retries, no pagination helpers, no caching.
Part of Probate
This is one piece of Probate, an email agent that lives one generation at a time and passes down only what a court approves. Built for Fly.io Hacksgiving 2026.
- Repository: github.com/harshbhx/probate
- Live site: probate.dualmindlab.tech
- Docs for this package: HTTP API reference and Everything we built
- The story: the Probate write-up
- Related: probate-client (npm), probate-mcp (npm), probate-court-checks (PyPI)
- Releases: v0.1.0, v0.2.0
Development
pip install -e services/core # the Courthouse the tests run against
pip install -e 'packages/client-py[dev]'
ruff check packages/client-py
pytest packages/client-py
License
MIT. Copyright (c) 2026 Harsh Bhanushali.
Metadata
Release files for probate-client 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| probate_client-0.1.1.tar.gz | 11.6 kB | Without provenance | Details for probate_client-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| probate_client-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for probate_client-0.1.1-py3-none-any.whl |
Total release size: 20.0 kB
Release files / probate_client-0.1.1.tar.gz
| Download URL | probate_client-0.1.1.tar.gz |
|---|---|
| Size | 11.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c0a6e6f2ce29669ef5ab7c461d8ebb8f2de38a74206e0f181bd78fea2cd90add
|
|
BLAKE2b-256 checksum How to use checksums |
d3674d416fb8138fc322180d26d7254eadfec328c1aa763e3865f4ebf870017e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|
Release files / probate_client-0.1.1-py3-none-any.whl
| Download URL | probate_client-0.1.1-py3-none-any.whl |
|---|---|
| Size | 8.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bffe0fa8f691d09b07ded36aaf4c68025bd58847b0d8cb64eafa144c665d4369
|
|
BLAKE2b-256 checksum How to use checksums |
76b386144feed4f7b203c189995c3f02ebbd4bb558fb0c8761a91fc03415709b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|
Security for probate-client 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.