Skip to main content

honua-sdk

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 for Honua Server, the multi-protocol geospatial server behind Honua -- query geospatial features, geocode addresses, stream data over gRPC, and convert results to GeoDataFrames. Sync and async clients included.

Status: Alpha (0.x). APIs may change before 1.0. Breaking changes to the public API are gated by a compatibility snapshot and a per-capability SDK coverage snapshot.

See the monorepo README for the full documentation index, install matrix, and release notes.

Highlights

  • Sync and async clients (HonuaClient, AsyncHonuaClient) with shared retry, refreshable-auth, and error-handling behavior.
  • Source-bound facade (client.source(...)) returns normalized features across GeoServices FeatureServer, OGC API Features, STAC, and OData.
  • Protocol wrappers for FeatureServer/MapServer/ImageServer/GeometryServer, SceneServer, ElevationServer, OGC Features/Maps/Tiles/Coverages/Processes/Records, STAC, WCS 2.0, WFS, WMS, WMTS, OData, COG (CogSession / client.cog()), and geocoding.
  • Optional geopandas extra converts query responses to GeoDataFrames in one call via honua_sdk.geopandas; the raster extra adds raster result interop (rasterio / rioxarray / xarray) and CogWindowData.to_numpy() / to_rioxarray().

Raster & Coverage Capability Matrix

Surface Support Entrypoints
Cloud-Optimized GeoTIFF (COG) Read-window ✓ · Managed tiles ✓ · Support matrix ✓ CogSession, AsyncCogSession, client.cog()
OGC API Coverages Discovery ✓ · Domain/Range ✓ · Typed get_coverage ✓ · 413/429 budgets ✓ client.ogc_coverages(), CoveragesClient
WCS 2.0.1 GetCapabilities ✓ · DescribeCoverage ✓ · GetCoverage ✓ · OWS/413 errors ✓ client.wcs(service_id), WcsClient
GeoTIFF / xarray Interop open_geotiff ✓ · geotiff_to_xarray ✓ · xarray_to_geotiff ✓ honua_sdk.raster (honua-sdk[raster])
  • Optional grpc extra unlocks streaming feature queries through honua_sdk.grpc.HonuaGrpcClient / HonuaGrpcAsyncClient.
  • The package ships the honua CLI for services, layers, style application, and sanitized doctor diagnostic bundles.

Install

pip install honua-sdk                   # core data-plane client
pip install "honua-sdk[geopandas]"      # + GeoDataFrame helpers
pip install "honua-sdk[grpc]"           # + streaming gRPC client
pip install "honua-sdk[raster]"         # + raster interop (rasterio/rioxarray/xarray)
pip install "honua-sdk[grpc,geopandas,raster]"  # everything

Requires Python 3.11+.

Install extras from the same package index and with the same version constraints as the core SDK. For a reproducible release, pin the same SDK version in each command; an older Git tag would replace the installed package with that version.

Minimal Example

The examples 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 base URL, service and layer.

from honua_sdk import HonuaClient, Query, SourceDescriptor, SourceLocator

with HonuaClient("https://demo.honua.io") as client:
    source = client.source(
        SourceDescriptor(
            id="maui-zoning",
            protocol="geoservices-feature-service",
            locator=SourceLocator(service_id="maui-zoning", layer_id=2),
        )
    )
    result = source.query(Query(where="island = 'Maui'", out_fields=["*"]))
    print(f"Found {len(result.features)} features")
    for feature in result.features[:3]:
        print(feature.id, feature.properties)

    # Requires the [geopandas] extra
    gdf = result.to_geodataframe()  # GeoDataFrame with geometry column + CRS set

The same SourceDescriptor with a different protocol (ogc-features, stac, odata, ...) returns the same normalized Result shape.

Always use the with HonuaClient(...) as client: form -- it guarantees the underlying httpx connections are returned to the pool on exit, even when a request raises.

Async

import asyncio

from honua_sdk import AsyncHonuaClient, Query, SourceDescriptor, SourceLocator

async def main() -> None:
    async with AsyncHonuaClient("https://demo.honua.io") as client:
        source = client.source(
            SourceDescriptor(
                id="maui-zoning",
                protocol="geoservices-feature-service",
                locator=SourceLocator(service_id="maui-zoning", layer_id=2),
            )
        )
        result = await source.query(Query(where="island = 'Maui'", out_fields=["*"]))
        print(f"Found {len(result.features)} features")
        async for feature in source.stream(Query(where="zone_code = '929'")):  # parks
            print(feature.id, feature.properties)


asyncio.run(main())

Works with FastAPI, asyncio pipelines, Jupyter, and any other async framework. asyncio.run(main()) is for scripts; Jupyter and IPython already run an event loop, where asyncio.run raises RuntimeError, so call await main() in a notebook cell instead. Sync and async clients share identical method names, retry, and error-handling behavior.

Protocol IDs follow the canonical cross-SDK names (geoservices-feature-service, ogc-features, stac, odata, ...). Common aliases (feature-server, featureserver, ogc-api-features, ...) are accepted and normalized through honua_sdk.normalize_protocol(...).

Server capability baseline

This SDK requires a Honua Server that advertises these capabilities in its capability manifest:

  • discovery.capability-manifest
  • serve.geoservices-featureserver
  • serve.ogc-api-features

All three ship in Honua Server's first published release, so that release is the minimum supported server (minimumServerVersion: first-release). The machine-readable declaration is release/sdk-capability-baseline.json; the Honua platform release reads it at the source revision this package was built from to decide which server versions this SDK is certified against.

Documentation

Rendered docs site: honua-io.github.io/honua-sdk-python. Platform docs: honua.io and honua.gitbook.io/honuaio.

Related: honua-admin (control-plane client), honua-sdk-js (JS/TS SDKs + MCP server), honua-sdk-dotnet (.NET SDKs).

Verify a release

From 0.2.1, each PyPI release is built by this repository's publication workflow, which attaches the same wheel and sdist to the matching GitHub release and records a build-provenance attestation for them. 0.2.0 was published without an attestation; use 0.2.1 or later when you need to verify provenance. The example verifies the 0.3.3 wheel from PyPI using public attestations. Run it in Bash with Python 3, pip, and GitHub CLI (tested with 2.103.3). No GitHub login or token is required. For another release, update both the version and the expected source commit to match that release.

(
  set -eu
  workdir="$(mktemp -d)"
  trap 'rm -r "$workdir"' EXIT
  cd "$workdir"

  version=0.3.3
  repo=honua-io/honua-sdk-python
  source=21a9ecb952e43ecc1450384e595259b1912f27b3
  wheel="honua_sdk-${version}-py3-none-any.whl"
  python3 -m pip download --only-binary=:all: --no-deps "honua-sdk==$version"

  python3 - "$wheel" "$repo" <<'PYTHON' > attestations.jsonl
import hashlib
import json
import sys
from pathlib import Path
from urllib.request import urlopen

wheel, repo = sys.argv[1:]
digest = hashlib.sha256(Path(wheel).read_bytes()).hexdigest()
with urlopen(f"https://api.github.com/repos/{repo}/attestations/sha256:{digest}", timeout=30) as response:
    attestations = json.load(response)["attestations"]
for attestation in attestations:
    print(json.dumps(attestation["bundle"]))
PYTHON

  gh attestation verify "$wheel" --bundle attestations.jsonl --repo "$repo" --source-digest "$source"
)

License

Apache-2.0

Metadata

Release files for honua-sdk 0.5.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for honua-sdk 0.5.1
File Size Uploaded Provenance Actions
honua_sdk-0.5.1.tar.gz 504.9 kB With provenance Details for honua_sdk-0.5.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for honua-sdk 0.5.1
File Interpreter ABI Platform Actions
honua_sdk-0.5.1-py3-none-any.whl Python 3 none any Details for honua_sdk-0.5.1-py3-none-any.whl

Total release size: 1.1 MB

Release files / honua_sdk-0.5.1.tar.gz

Download URL honua_sdk-0.5.1.tar.gz
Size 504.9 kB
Tags Source
SHA-256 checksum
How to use checksums
b41120c137205fbeb597c9d9820e33a19c7d6e50617b841c34cdc4d1c941b807
BLAKE2b-256 checksum
How to use checksums
939c6e868f8468f8816bb342853ba043138532ff41cab80c2b15e8e8a2411d5b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.

Transparency log

Release files / honua_sdk-0.5.1-py3-none-any.whl

Download URL honua_sdk-0.5.1-py3-none-any.whl
Size 618.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a8a070345c795edf090600e2b958e2b81b54a2587590aeb245524c9b6421783d
BLAKE2b-256 checksum
How to use checksums
7850aa71f7e7d4d0c054de597bbb66ea4608df9fa94f2602ee684a1b4ed0e596
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.

Transparency log

Security for honua-sdk 0.5.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for honua_sdk-0.5.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page