Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Portolan Python

A lightweight Python implementation of the Portolan specification.

portolan-python provides catalog reading, in-memory authoring, validation, and conformance APIs for Python applications.

The authoring API creates Portolan 0.3.0 metadata and storage-independent write plans. Applications remain responsible for materializing those plans.

The project intentionally focuses on Portolan itself, rather than on geospatial data processing.

It does not aim to replace GDAL, Rasterio, GeoPandas, GeoParquet tooling, tile generators, GIS servers, or other specialized geospatial software.

Motivation

Portolan defines an opinionated way of organizing and describing cloud-native geospatial data using existing standards and formats such as STAC, GeoParquet, COG, PMTiles, COPC, and Zarr.

Applications integrating with Portolan need a reliable implementation of that contract.

Without a reusable core library, every integration would need to independently implement:

  • Portolan catalog semantics;
  • STAC traversal;
  • collection and asset handling;
  • Portolan-specific requirements;
  • link and HREF resolution;
  • metadata validation;
  • conformance rules;
  • metadata loading and typed access.

portolan-python provides that reusable implementation.

The core design principle is:

Portolan defines the contract. Specialized tools implement data processing.

For example, this library may determine that an asset is a GeoParquet asset and expose its URI and metadata. It does not need to read the GeoParquet rows itself.

Likewise, it may identify a COG asset without becoming a raster processing library.

Current scope

portolan-python is responsible for the Portolan domain model and specification semantics.

Current responsibilities include:

  • opening Portolan catalogs;
  • reading Portolan/STAC metadata;
  • navigating catalogs, collections, items, assets, and links;
  • resolving relative and absolute HREFs;
  • exposing Portolan extensions and metadata;
  • validating Portolan structures;
  • checking Portolan conformance;
  • exposing asset type and media-type information;
  • handling specification versions;
  • authoring new catalog graphs in memory;
  • producing deterministic PUT-only write plans;
  • providing stable Python APIs for applications built on Portolan.

A conceptual API may look like:

from portolan import Catalog

catalog = Catalog.open("https://example.com/catalog.json")

for collection in catalog.collections():
    print(collection.id)

    for asset in collection.assets():
        print(asset.href)
        print(asset.media_type)
        print(asset.roles)

Validation should similarly be available programmatically:

from portolan import Catalog, Validator

catalog = Catalog.open("./catalog.json")

result = Validator.validate(catalog)

if not result.valid:
    for error in result.errors:
        print(error)

The exact API will evolve during implementation, but it should remain small, explicit, typed, and independent from any CLI.

Non-goals

This project should not become a general-purpose geospatial processing library.

In particular, the core should not be responsible for:

  • reading GeoParquet feature data;
  • writing GeoParquet datasets;
  • converting Shapefile to GeoParquet;
  • creating COGs;
  • reading raster pixels;
  • creating PMTiles;
  • processing COPC;
  • converting MrSID or ECW;
  • extracting data from WFS;
  • extracting data from ArcGIS;
  • extracting data from CARTO;
  • running pygeoapi;
  • managing QGIS projects.

Those capabilities belong to specialized libraries, applications, or optional integrations.

Portolan should be opinionated about what constitutes a conformant Portolan catalog and asset, not unnecessarily opinionated about which software must produce or consume those assets.

Architecture

                    Portolan Specification
                             │
                             ▼
                      portolan-python
                   ┌────────────────────┐
                   │ Domain model       │
                   │ Catalog access     │
                   │ STAC semantics     │
                   │ Portolan semantics │
                   │ HREF resolution    │
                   │ Validation         │
                   │ Conformance        │
                   └─────────┬──────────┘
                             │
              ┌──────────────┼──────────────┐
              ▼              ▼              ▼
         portolan-cli    integrations    other apps

Relationship with portolan-cli

portolan-cli should consume this library rather than implement Portolan domain logic itself.

For example:

portolan validate
portolan inspect
portolan registry list

should be CLI representations of APIs provided by the Portolan Python ecosystem.

The CLI should remain an interface layer.

Potential consumers

Python applications and integrations can embed this library without introducing application-specific dependencies. The external geoserver-portolan plugin is one example of a consumer that uses the SDK.

Relationship with portolan-java

portolan-java is the Java counterpart of this project.

The two libraries should implement the same conceptual Portolan contract, while following the conventions of their respective languages.

They should not necessarily expose identical classes or method signatures.

The Portolan specification remains the source of truth.

                 Portolan Specification
                    /             \
                   /               \
          portolan-python      portolan-java

Design principles

  1. Specification first.
  2. Small and stable public API.
  3. No CLI dependency.
  4. No application-server dependency.
  5. No mandatory geospatial processing stack.
  6. Specialized formats are represented, not reimplemented.
  7. External applications should not need to reimplement Portolan semantics.
  8. The library should be suitable as a dependency of long-lived applications.

Next steps

The authoring API creates and edits graphs without storage access. Deletion planning requires an explicit snapshot of previously managed metadata keys. Storage materialization remains application-owned. Round 3 hardens fidelity, deterministic planning, failure handling, and documentation round trips.

Local documentation

  • Scope defines what belongs in this core library.
  • Authoring shows in-memory graphs and storage-independent plans.
  • Examples shows basic API usage.
  • Development lists setup, test, and build commands.
  • Distribution explains releases, pip, and PyPI publishing.
  • Conformance explains SDK conformance and catalog validation.

Conformance checks

Install the pinned portolan-conformance revision from the CI workflow. Then run the SDK adapter against the released read profile:

make check-conformance

The target writes read-profile-report.json in the repository root. During development, make check-conformance-write covers the W01–W15 Round 1 cases when CONFORMANCE points to a checkout that contains Write Profile v1. It does not validate full catalog conformance.

See Conformance for the supported profile and Rashid integration.


Metadata

Release files for portolan-python 1.0.0rc2

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

Source distribution (sdist)

Source distribution for portolan-python 1.0.0rc2
File Size Uploaded Provenance Actions
portolan_python-1.0.0rc2.tar.gz 160.6 kB With provenance Details for portolan_python-1.0.0rc2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for portolan-python 1.0.0rc2
File Interpreter ABI Platform Actions
portolan_python-1.0.0rc2-py3-none-any.whl Python 3 none any Details for portolan_python-1.0.0rc2-py3-none-any.whl

Total release size: 177.5 kB

Release files / portolan_python-1.0.0rc2.tar.gz

Download URL portolan_python-1.0.0rc2.tar.gz
Size 160.6 kB
Tags Source
SHA-256 checksum
How to use checksums
8d312c2c7928dbbe3e9e6ca63fff88e34491b9d9cda183ed02c89a8f6a8248af
BLAKE2b-256 checksum
How to use checksums
0a7c64d19431543f568dc282afe253584e02f0f740e3eece2b73757a1f497321
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 Nov 22, 2026.

Transparency log

Release files / portolan_python-1.0.0rc2-py3-none-any.whl

Download URL portolan_python-1.0.0rc2-py3-none-any.whl
Size 16.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
706ad6be3ac72ccac4733c9d254987a2e15a3444df4c069d6cbf95f52c031995
BLAKE2b-256 checksum
How to use checksums
56a7fe10ac35c481f11f7ac9ed3592954fc337b0627cddc200f45b665c583ee5
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 Nov 22, 2026.

Transparency log

Security for portolan-python 1.0.0rc2

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 portolan_python-1.0.0rc2.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 Nov 22, 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