Skip to main content

Portolan Python

A lightweight Python implementation of the Portolan specification.

portolan-python provides the core domain model, catalog access, validation, and conformance APIs required to work with Portolan catalogs from Python applications.

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;
  • serialization and deserialization.

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.

Scope

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

Expected responsibilities include:

  • opening Portolan catalogs;
  • creating Portolan catalogs;
  • reading and writing 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;
  • 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;
  • publishing data to GeoServer;
  • 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   portolan-geoserver  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.

Relationship with portolan-geoserver

portolan-geoserver uses this library to understand Portolan catalogs and uses python-geoservercloud to interact with GeoServer.

The responsibilities remain separated:

portolan-python
    │
    │ understands Portolan
    ▼
portolan-geoserver
    │
    │ maps Portolan resources to GeoServer
    ▼
python-geoservercloud
    │
    │ manages GeoServer
    ▼
GeoServer

portolan-python therefore contains no GeoServer-specific logic.

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 GIS 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.

Local documentation

  • Scope defines what belongs in this core library.
  • Examples shows basic API usage.
  • Development lists setup, test, and build commands.
  • Distribution explains releases, pip, and PyPI publishing.

Metadata

Release files for portolan-python 0.1.8

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 0.1.8
File Size Uploaded
portolan_python-0.1.8.tar.gz 80.1 kB Details

Built distribution (wheel)

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

Total release size: 91.8 kB

Release files / portolan_python-0.1.8.tar.gz

Download URL portolan_python-0.1.8.tar.gz
Size 80.1 kB
Tags Source
SHA-256 checksum
How to use checksums
c926bb3e774c46c72e39a425c356755acb2b998126e8fe8f355ff9a39f22de95
BLAKE2b-256 checksum
How to use checksums
6ff75eb335172cdb93ce4293ce0bb8ac885519d9bd80ff02e11cdc3e59b662dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 8, 2026.

Transparency log

Release files / portolan_python-0.1.8-py3-none-any.whl

Download URL portolan_python-0.1.8-py3-none-any.whl
Size 11.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b73dc3c66f0288dd6876e7734e89b70fb18227434d90e8d1f7f56e64a14e370c
BLAKE2b-256 checksum
How to use checksums
b95145108abd0d61171668f9b73cd4eb71d4c534022bc8b9cc43b26eb7ed0fb8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 8, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.8 This release

2 release files

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