Python SDK
Feature status
What the Python SDK supports today compared with TypeScript.
The Python SDK is in beta. This table tracks coverage against the TypeScript packages.
| Feature | TypeScript | Python |
|---|---|---|
| Dimensions and base measures | Available | Available |
| Filtered measures | Available | Available |
| Filters on dimensions and declared filters with operator allowlists | Available | Available |
Null-check filters (isNull, isNotNull) | Available | Available: filter.is_null / filter.is_not_null, opt-in per filter's operators |
Relationships (belongs_to, has_one, has_many) | Available | Available |
| Time grains | Available | Available, including per-dataset time_grains restriction |
| Sync and async execution | Available | Available |
| Streamed results (rows and Arrow) | Available (stream, streamArrow) | Available (stream, stream_arrow) on every executor |
| Embedded ClickHouse (chDB) | Available (query builder adapter, init --database chdb) | Available since 0.1.0b3 (dataset executor, init --database chdb) |
| Result caching and multi-tenancy | Available | Available |
| Dataset catalog | Available | Available |
Typed DataFrames (to_pandas, to_polars, to_arrow) | Not applicable | Available |
| Framework integrations | Next.js, Node.js, Vite guides | Django, Flask, SQLAlchemy (hypequery.contrib) |
approxCountDistinct measures | Available | Available locally (measure.approx_count_distinct, ClickHouse uniq, marked approximate in catalogs); publishing needs deployment contract 3, like TypeScript |
measure.merge over AggregatingMergeTree state columns | Available | Available (measure.merge("uniq", "users")), published with its stateFunction |
final: true for ReplacingMergeTree / CollapsingMergeTree sources | Available | Available as row_resolution=resolved_rows.replacing(deleted_column=...) (or .final(), .collapsing(sign_column=...), .versioned_collapsing(...)) |
| Derived measures | Available | Available (measure.derived with formula.*) |
| Window measures (trailing, to-date, cumulative) | Available | Available locally (measure.trailing("revenue", 7, "day"), measure.to_date(...), measure.cumulative(...)) with a by grain and one bounded time range; not advertised to client endpoints; publishing needs deployment contract 3 |
Period comparisons (shift) | Available | Available locally (measure.shift("revenue", 1, "month"), derived measures over shifts, and shifts of derived, window or shifted measures); same limits as window measures |
| Segments | Available | Available locally (dataset(segments={"paid": segment(filter.eq(...))}), DatasetQuery(segments=...)); publishing needs deployment contract 3, like TypeScript |
| Relationship checks | Available | Available (check_relationships) |
| Cloud publishing | Not yet | hypequery cloud is not live. Bundle export works today (write_dataset_bundle); one-step publish is planned |
| MCP server for AI agents | Available | Available: hypequery mcp over stdio, in-process from an Api or bridging a served client contract (mcp extra; setup) |
| Business context for agents | Available | Available (define_business_context; business_context= on ClientContractExecutor.create and on deployment bundles) |
| Tool generation for agents | Available | Under consideration |
| Serve: auth, CORS, rate limiting, errors | Available | Available |
| Serve: JWT strategy and token issuer | Available | Available (jwt_strategy, analytics_token_issuer; tokens verify across languages) |
Serve: your app's own login (fromContext) | Available | Available (from_context, django_user, flask_session) |
| Serve adapters | Fetch, Node, Vercel | ASGI, WSGI, native Django and Flask (to_asgi_app, to_wsgi_app, urls, blueprint) |
| Serve: dataset query endpoints and discovery | Available | Available |
CLI (init, generate datasets, dev) | Available | Available |
Client contract export (export client-contract) | Available: api.clientContract() and hypequery export:client-contract | Available |
| Typed React hooks | Available: types inferred with InferApiType, routes from generate:manifest; or a client contract and generate:client for a frontend in another repo | Available via exported client contracts and generate:client (setup) |
| Query builder | Available | Not planned |
| Named metrics | Available | Not planned. Use metric endpoints or derived measures |