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
- Specification first.
- Small and stable public API.
- No CLI dependency.
- No application-server dependency.
- No mandatory geospatial processing stack.
- Specialized formats are represented, not reimplemented.
- External applications should not need to reimplement Portolan semantics.
- 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 and write profiles:
make check-conformance
The target writes read-profile-report.json and write-profile-report.json.
Use make check-conformance-write to run only Write Profile v1.1.
It does not validate full catalog conformance.
See Conformance for the supported profile and Rashid integration.
Metadata
Release files for portolan-python 1.0.0rc3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| portolan_python-1.0.0rc3.tar.gz | 161.5 kB | With provenance | Details for portolan_python-1.0.0rc3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| portolan_python-1.0.0rc3-py3-none-any.whl | Python 3 | none | any | Details for portolan_python-1.0.0rc3-py3-none-any.whl |
Total release size: 178.7 kB
Release files / portolan_python-1.0.0rc3.tar.gz
| Download URL | portolan_python-1.0.0rc3.tar.gz |
|---|---|
| Size | 161.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e46444c60f865a11f1298e6cd4d101c80ca35aaa8851c7dd66ec7c96db6a0efe
|
|
BLAKE2b-256 checksum How to use checksums |
f5b82ded247ffce4a971379aef3e0d7b517d1f6144511fcb186402cc14b7c061
|
| 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 23, 2026.
Transparency logRelease files / portolan_python-1.0.0rc3-py3-none-any.whl
| Download URL | portolan_python-1.0.0rc3-py3-none-any.whl |
|---|---|
| Size | 17.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c61950619e83133e3a131832a9728d5d47d599b8f0ed50ddc508cf0e945a0916
|
|
BLAKE2b-256 checksum How to use checksums |
7417a05e8fd288ae6121979b264d7607a74a7a029ba00586f110f0bc84ab34ba
|
| 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 23, 2026.
Transparency logSecurity for portolan-python 1.0.0rc3
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.
Attestation for portolan_python-1.0.0rc3.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 23, 2026.
Transparency logA 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.