Skip to content

Python SDK and repository tools

The supported 0.x SDK provides installed scientific clients, CLI and templates over preview contracts. Source installation is qualified; PyPI publication and stable 1.0 remain release gates. The scalar-map commands below remain repository tools with their own qualified fixtures and dependencies; the curve SDK does not turn them into a universal conversion API.

Use a dedicated Python environment. The qualified environment used Python 3.12; tools/scalar_maps/requirements.txt records the dependency pins used by the pilot. From the repository root:

Terminal window
python3.12 -m venv .venv-scalar-docs
. .venv-scalar-docs/bin/activate
python -m pip install -r tools/scalar_maps/requirements.txt

Use new destination directories: the commands refuse to overwrite an existing bundle.

Terminal window
python -m tools.scalar_maps build \
tests/fixtures/scalar-map/usgs-crs/export-32.txt \
tests/fixtures/scalar-map/usgs-crs/metadata-32.json \
./usgs-source-bundle
python -m tools.scalar_maps reproject \
./usgs-source-bundle ./usgs-mercator-bundle \
--target-crs EPSG:3857 --resolution 100 --resampling nearest
python -m tools.scalar_maps verify ./usgs-source-bundle
python -m tools.scalar_maps verify ./usgs-mercator-bundle

Each command prints JSON containing asset identity, bundle revision, shape and missing-value count. For the retained 32×32 fixture and qualified dependency versions, the source has shape [32, 32]; the derived grid has shape [59, 46] with 104 missing samples. Version changes can affect derived grid/results and change representation identity; retain recorded versions rather than treating all future outputs as identical.

These operations need no login, generated gRPC code or running ArrayBridge service. Conversion preserves the original directory. Open either map.tif in QGIS or another GeoTIFF reader; retain its manifest and original bundle for provenance.

CommandInputsOutput
buildRegular X/Y/value text, metadata JSON, new destinationOriginal portable bundle
reprojectOriginal bundle, new destination, target CRS/resolution/resamplingDerived representation
verifyOriginal or derived bundle directoryIntegrity/contract validation or an error

For original bundles, verification compares raster values and geometry with the retained numerical export. Derived verification checks the manifest identity, raster hash and declared geometry; it does not rerun the warp or independently establish source accuracy.

Keep host capture, scientific conversion, authenticated publication and destination application separate. project_maps.py contains the current client/publisher integration; consumer_bridge.py adapts the project API to the local QGIS client. These modules are implementation references, not a versioned SDK compatibility promise. Network modules require generated arraybridge_pb2 bindings matching the deployed protocol and an operator-provisioned service.

Declare supported host versions, data types, directions, change detection, thread requirements and losses. Test retries, stale writes, exact historical reads, changed representation policies, missing values, CRS/units and permission removal. A released connector must include end-user setup/troubleshooting and developer contract documentation alongside its implementation.

Scalar-map schema · API semantics · Public exercise without a checkout.