Skip to content
Make with

py-maplibregl

Python bindings for MapLibre GL JS

Maintained by EODA

py-maplibregl provides Python bindings for MapLibre GL JS, enabling data scientists and analysts to create interactive maps directly from Python. It offers comprehensive documentation and practical examples, making it easy to integrate MapLibre maps into Python data workflows and Jupyter notebooks.

Quick start

pip install maplibre
from maplibre import Map, MapOptions

m = Map(
    MapOptions(
        style="https://tiles.openfreemap.org/styles/liberty",
        center=(-123.1256, 49.24658),
        zoom=9,
    )
)
m.save(preview=True)
›Setup noteschecked with v0.3.6

m.save(preview=True) writes a standalone HTML file and opens it in the browser. In Jupyter or marimo, install "maplibre[ipywidget]", use from maplibre.ipywidget import MapWidget as Map, and show m as the cell's last line.

Other platforms are on SDKs.