Native application path: gRPC for live data and edits; PMTiles, GeoParquet and COG through the CDN. Start there for native Python gRPC setup, signed private URLs and regeneration after changes. OGC API and GeoServices REST examples below are compatibility workflows.
Python client libraries for Honua, the cloud-native geospatial platform built around honua-server. One typed client covers feature queries, geocoding, map/image export, editing, and server administration across the server's protocol adapters — GeoServices REST (FeatureServer/MapServer/ImageServer/GeocodeServer/GeometryServer), OGC API Features, STAC, OData, WFS/WMS/WMTS, and gRPC streaming — with one-call GeoDataFrame interop for the pandas/GeoPandas stack.
Two independently installable, Apache-2.0 packages live under packages/:
| Package | Import | Description |
|---|---|---|
packages/honua-sdk |
honua_sdk |
Data-plane client — feature queries, geocoding, protocol clients, gRPC streaming, GeoPandas/raster interop, honua CLI |
packages/honua-admin |
honua_admin |
Control-plane client — services, connections, layers, styles, metadata, manifests, compatibility checks (depends on honua-sdk) |
Also in this repo: packages/honua-gp, an Apache-2.0
geoprocessing integration package published to PyPI as honua-gp. Install it
with pip install honua-gp and import it as honua_gp.
Alpha (0.x). APIs may change before 1.0; upgrade rules, the post-1.0
2-minor deprecation window, and breaking-change guardrails are documented in
COMPATIBILITY.md and enforced by the
compatibility snapshot and per-capability
SDK coverage snapshot.
Releases are automated with release-please and PyPI Trusted Publishing and
ship to PyPI as honua-sdk and honua-admin. After release-please creates a
package tag and GitHub Release, the publication workflow reconciles that exact
release commit, publishes the SDK before the dependent admin package, and
attaches the wheel and source distribution to the GitHub Release.
Requires Python 3.11+ (CI tests 3.11, 3.12, 3.13). From PyPI:
pip install honua-sdk # data-plane client (core)
pip install "honua-sdk[geopandas]" # + GeoPandas / Shapely
pip install "honua-sdk[analytics]" # + Arrow / Parquet / Polars / DuckDB
pip install "honua-sdk[viz]" # + interactive notebook maps (lonboard / folium)
pip install "honua-sdk[grpc,raster]" # + gRPC streaming and raster interop
pip install "honua-sdk[all]" # everything
pip install honua-admin # control-plane (admin) clientThe commands above are the release install. They use the configured package index and version constraints and leave the admitted published package in place.
A source checkout is a separate development environment, not the next step after that install. The commands below install the checkout's version into the current environment and replace the published package. An unqualified clone follows the default branch, not this document's revision and not the published artifact. Release qualification refuses every direct-origin install, including one whose version string matches the admitted package. A successful source build does not establish published wheel identity. Use a separate environment for that work; the contributor setup is also in AGENTS.md.
git clone https://github.com/honua-io/honua-sdk-python.git
cd honua-sdk-python
# Data-plane client
pip install ./packages/honua-sdk
# With optional extras: gRPC streaming, GeoPandas vector interop,
# raster interop (rasterio / rioxarray / xarray)
pip install "./packages/honua-sdk[grpc,geopandas,raster]"
# Control-plane (admin) client — installs honua-sdk alongside it
pip install ./packages/honua-sdk ./packages/honua-adminFor the published SDK with GeoPandas support, use the PyPI extra:
pip install "honua-sdk[geopandas]"This uses the configured package index and version constraints, just like the core install above. For a reproducible release, pin the same SDK version for both the core package and its extras; installing an older Git tag would replace the installed SDK with that older version.
The repo-root pyproject.toml is intentionally not installable (it holds
shared tool config only) — install the per-package directories, not ..
INSTALL.md has extras details and install-time troubleshooting.
Connect to a Honua server, open a layer or collection as a unified Source,
and read directly into GeoPandas, Arrow, Polars, DuckDB, or an interactive
notebook map. The examples below read the public, anonymous demo server at
https://demo.honua.io and its maui-zoning FeatureServer (layer 2: zoning
polygons with zone_code, zone_dist, cp_area and island). To use your
own server, change the URL, service, and layer.
from honua_sdk import connect
with connect("https://demo.honua.io") as client:
zoning = client.layer("maui-zoning", 2)
# GeoDataFrame in one call (requires [geopandas]; format="auto"|"arrow"|"parquet"|"json")
gdf = zoning.to_geodataframe(where="island = 'Maui'", fields=["*"])
print(gdf.head(), gdf.crs)
# Modern Python data stack (requires [analytics] / [arrow])
table = zoning.to_arrow(where="island = 'Maui'") # pyarrow.Table (GeoArrow IPC)
pl_df = zoning.to_polars(where="island = 'Maui'") # polars.DataFrame
rel = zoning.to_duckdb(where="island = 'Maui'") # DuckDB relation
# Paginated GeoArrow batches for large layers
for batch in zoning.iter_arrow(where="island = 'Maui'", page_size=500):
print(batch.num_rows)
# Interactive notebook map preview (requires [viz]; uses lonboard or geopandas.explore)
widget = zoning.explore(where="island = 'Maui'")connect(url) probes server capabilities (attached as
client.discovered_capabilities) and returns a configured HonuaClient.
client.layer(service_id, layer_id, protocol=...) and
client.collection(collection_id) return a unified Source without needing
SourceDescriptor / SourceLocator boilerplate (both remain available for
serialization and explicit descriptor workflows). Pass protocol="grpc" to
route Source.query(), Source.stream(), and Source.apply_edits() over
native gRPC ([grpc] extra). In Jupyter, Source, Result, and LayerSchema
render rich HTML summary cards via _repr_html_().
from honua_sdk import connect
from honua_sdk.compat import HonuaPortalClient
with connect("https://demo.honua.io") as client:
# OGC API Features collection as a unified Source
collection_gdf = client.collection("2").to_geodataframe(limit=100)
# Direct Arrow IPC and GeoParquet queries
raw_parquet = client.query_parquet("maui-zoning", 2, where="island = 'Maui'", as_table=False)
# 3D Scenes catalog & tileset inspection
scenes = client.scenes().list_scenes()
# OGC API Processes / server geoprocessing
processes = client.geoprocessing().processes()
# Portal repointing directly into a unified Source carrying the Portal token
with HonuaPortalClient("https://your-honua-server.com") as portal:
portal.generate_token("alice", "secret")
with portal.open_feature_service("item-id") as opened:
portal_gdf = opened.layer(0).to_geodataframe(where="1=1")For raw OGC API Features endpoints, client.ogc_features().collections() and
client.ogc_features().collection("2").items(...) remain available.
from honua_sdk import HonuaGeocodingClient
with HonuaGeocodingClient("https://demo.honua.io") as geocoder:
results = geocoder.forward_geocode("1600 Pennsylvania Ave NW, Washington, DC")
for r in results:
print(f"{r.address} ({r.latitude}, {r.longitude}) score={r.score}")Every HTTP and gRPC workflow has an async counterpart with the same factory and method names — works with FastAPI, asyncio pipelines, and Jupyter:
import asyncio
from honua_sdk import async_connect
async def main() -> None:
async with async_connect("https://demo.honua.io") as client:
result = await client.layer("maui-zoning", 2).query(where="1=1")
print(f"Found {len(result.features)} features")
asyncio.run(main())asyncio.run(main()) is for scripts. Jupyter and IPython already run an event
loop, where asyncio.run raises RuntimeError; call await main() in a
notebook cell instead.
Admin needs a server of your own: the public demo returns 401 for
/api/v1/admin/*. Install honua-admin, then set HONUA_API_KEY to an admin
API key for your server (the
honua-server quickstart
shows how to mint one with HONUA_ADMIN_PASSWORD).
import os
from honua_admin import HonuaAdminClient
# Admin needs a server of your own: the public demo returns 401 for /api/v1/admin/*.
# Mint a key with HONUA_ADMIN_PASSWORD on your server - see the honua-server quickstart.
with HonuaAdminClient("https://your-honua-server.com", api_key=os.environ["HONUA_API_KEY"]) as admin:
compatibility = admin.check_compatibility()
if not compatibility.supported:
raise RuntimeError("; ".join(compatibility.reasons))
services = admin.list_services()
print(f"Services: {len(services)}")
raw_response = admin.raw.call("getConnections")
print(f"Raw status: {raw_response.status_code}")Protocol IDs. Docs and examples use the canonical cross-SDK protocol ids (
geoservices-feature-service,ogc-features,stac,odata, ...). Common aliases (feature-server,ogc-api-features, ...) are accepted at runtime and normalized byhonua_sdk.normalize_protocol(...); the full table lives inhonua_sdk.PROTOCOL_ALIASES. Compact helpers (client.query(...),client.query_features(...)) remain for one-liners — see Protocol Examples for every wrapper and Protocol Parity for the Python/JS coverage map.
| Typed, canonical query surface | connect(), client.layer(), client.collection(), and Source / Query / Result with normalized QueryFeature across FeatureServer, OGC Features, STAC, OData, and gRPC |
| Modern Python data stack | Zero-copy GeoArrow IPC (to_arrow(), iter_arrow(), query_arrow()), GeoParquet (query_parquet()), `to_geodataframe(format="auto" |
| Notebook & viz DX | XSS-escaped _repr_html_() cards on Source, Result, and LayerSchema, plus one-call .explore() delegating to lonboard or geopandas.explore() ([viz] extra) |
| Protocol clients | GeoServices (Feature/Map/Image/Geocode/Geometry/Scene/Elevation servers), Portal facade (opened.layer(...)), OGC API Features/Maps/Tiles/Coverages/Processes/Records, STAC, OData, WFS, WMS, WMTS, geoprocessing + workflow wrappers — see protocol parity |
| gRPC streaming | Native client.layer(..., protocol="grpc") and honua_sdk.grpc.HonuaGrpcClient / HonuaGrpcAsyncClient for unary, streaming, and edit RPCs ([grpc] extra) |
| Sync + async | HonuaClient / AsyncHonuaClient in lockstep (sync clients generated from the async source of truth) |
| Automatic retry | 429/502/503/504 with exponential backoff and Retry-After support for idempotent methods (POST only when opted in via retry_methods on the retry transport); configurable via max_retries |
| Typed errors | HonuaAuthError, HonuaRateLimitError, HonuaHttpError, HonuaTimeoutError, HonuaTransportError — see common errors |
| CLI | honua (services / layers / style apply / sanitized doctor diagnostics) |
| Quality gates | mypy strict workspace-wide, 94% coverage gate, public-API compatibility snapshot, per-capability SDK coverage snapshot, live-server conformance lane against shared geospatial-grpc fixtures |
The rendered docs site lives at honua-io.github.io/honua-sdk-python (versioned MkDocs build of docs/). Platform-level docs are at honua.io and honua.gitbook.io/honuaio.
- 5-Minute Quickstart — query, GeoDataFrame, plot, common errors
- Core Client — typed service, FeatureServer, applyEdits, pagination, error handling
- Protocol Examples — OGC, STAC, WFS, WMS, WMTS, OData, geocoding, gRPC with response shapes
- 3D Scenes — list scenes, resolve tilesets, inspect
tileset.json, and read optional I3S layers - Branch Versioning —
VersionManagementClient, managed read/edit sessions, reconcile, conflict resolution, and post - Offline Replica Sync —
ReplicaSyncClient, SQLiteLocalReplicaStore, offline edit queues, conflicts, and gRPCDownloadReplicaPage - Terrain & Vector Tiles — Terrain-RGB, Quantized-Mesh 1.0, elevation queries, and
VectorTileServerClient - Printing & Static Maps —
PrintingClientlayout exports andStaticMapClientURL building and bounded image fetches - Temporal History, H3 & Real-Time Streams —
HonuaTemporalClient, H3 hexagonal aggregation (query_h3/h3), and WebSocketAsyncFeatureStreamClient - Admin Alerts, Webhooks, Schedules & Bulk Transfers —
admin.alerts,admin.webhooks,admin.schedules,import_dataset, andexport_layer - AI Framework Adapters & Local Geospatial I/O — LangChain, PydanticAI, and MCP adapters plus local CSV and FlatGeobuf I/O
- Authentication — refreshable bearer tokens, storage, rotation, failure modes
- Pagination and retries & timeouts
- Sanitized diagnostic bundles — the
honua doctorbundle format - Geospatial ETL demo — script-first ETL flow with notebook companion
- Compatibility and upgrade policy — SemVer contract, 2-minor deprecation window, and upgrade guardrails
- Compatibility — supported server matrix and public-API snapshot gate
- SDK coverage — per-capability coverage snapshot gate
- Troubleshooting — base URL, auth, staging smoke env vars, cleanup
| Repo | What it is |
|---|---|
| honua-server | Flagship multi-protocol geospatial server this SDK talks to |
| honua-sdk-js | JavaScript/TypeScript SDKs + MCP server |
| honua-sdk-dotnet | .NET SDKs |
| honua-console | Display-and-approve web console; Studio is Preview and is not part of the qualified 2026.1 scope |
| honua-qgis-plugin | QGIS plugin (private preview; repo not yet public) |
| geospatial-grpc | Vendor-neutral gRPC protocol standard; source of this repo's conformance fixtures |
Lint, type-check, and tests run from a clone. Besides Python 3.11+, the test
suite needs Node.js with node on PATH: the honua CLI forwards
honua admin ..., honua map ... and the other commands only the JavaScript
CLI implements to an installed @honua/sdk-js, and tests/test_cli.py checks
that forwarding. The editable installs below replace the published package, so they
belong in a development environment, not in the environment used to verify a
release. The same contributor setup is in AGENTS.md.
# Editable install of both packages with extras
pip install -e "packages/honua-sdk[grpc,geopandas]"
pip install -e "packages/honua-admin"
pip install pytest pytest-cov ruff mypy
# Lint + type-check (mypy runs in strict mode)
ruff check .
python -m mypy packages/honua-sdk/honua_sdk packages/honua-admin/honua_admin
# Deterministic local test suite
python3 -m pytest tests/ -q
# Public-API compatibility gate
python3 scripts/compatibility_gate.pySync clients (client.py, _client.py) are generated from their async
counterparts — edit the async module and run python scripts/gen_sync.py;
never hand-edit the generated files.
Opt-in integration lanes (staging smoke, live-server conformance, release
smoke) need HONUA_BASE_URL and the --run-integration flag; see
docs/troubleshooting.md and
docs/compatibility.md for env vars, markers, and
result artifacts.
The conformance lane also requires HONUA_GRPC_TARGET=host:port for the same
candidate host as HONUA_BASE_URL. CI maps the gRPC listener from the same
image/source-verified container. It runs public unary and streaming queries,
typed missing-service refusals, and a real add/update/delete batch with atomic
missing-target refusal and independent readback. Editing uses newly allocated,
marker-bound scratch rows and verifies their cleanup. Run this lane only against
an isolated certification fixture, with the pinned shared fixtures and installed
SDK wheel; missing prerequisites fail the explicitly requested lane. The full
release fragment still requires every independent operation cell to pass.
Bugs and feature requests: GitHub issues. This repository does not accept outside code contributions. Bug reports, feature requests, and interoperability reports are welcome through GitHub Issues. See CONTRIBUTING.md for the policy and security-reporting guidance.
Report vulnerabilities to [email protected] — see the org security policy. Do not open public issues for security reports.
honua-sdk, honua-admin, and honua-gp are licensed under
Apache-2.0.
The conformance workflow uses an explicit Enterprise Development grant only for
PR/nightly rehearsal fixtures. These receipts carry
development-grant-rehearsal-v1, which does not match the governed release auth
policy and cannot qualify release cells, so those runs exercise every conformance
case but request no protocol-certification fragment. Only a certification_tier: release dispatch emits one. Release dispatches clear the grant and boot
Licensing__Mode=Disabled, the 2026.1 runtime, and leave the signed license
envelope unread. Compose overrides and artifacts contain no license bytes.
Before SDK edit/rollback/readback, release runs require the candidate license
status to report mode disabled with the editing entitlement active. The receipt
retains that fresh observation. A rehearsal grant, a signed-license claim, or a
stale observation fails closed.
Use the Honua vocabulary for Connections, Datasets, Layers, Services, Folders and Environments.