Skip to main content

Mapyta

One import. A few method calls. A full interactive map.

PyPI version Supported Python versions Tests Documentation License: MIT


Documentation: https://egarciamendez.github.io/mapyta

Source Code: https://github.com/egarciamendez/mapyta


Build OpenStreetMap visualizations with hover tooltips, choropleths, heatmaps, and export to HTML or PNG all from Shapely geometries.

Perfect for geotechnical site plans, infrastructure overviews, or any spatial data visualization where you want more control than static images but don't need the full power of a GIS.

Mapyta is standing on the shoulders of giants like Folium and Leaflet, but it's designed to be more intuitive and Pythonic for users who are already familiar with Shapely and GeoPandas. It's not trying to replace a full GIS, but rather to provide a simple way to create interactive maps without needing to learn a whole new set of tools.

A mapyta map of Amsterdam with markers, areas, and a walking route

👉 See the Showcase — every feature as a live, interactive map on a single page.


Key features


Installation

Mapyta requires Python 3.12+.

uv add mapyta
# or
pip install mapyta

Exporting maps to PNG/SVG images additionally needs a headless browser (Chrome, Chromium, or Edge) and the export extra:

uv add "mapyta[export]"
# or
pip install "mapyta[export]"

Quickstart

Create your first map:

from shapely.geometry import Point
from mapyta import Map

m = Map(title="Hello Utrecht")
m.add_point(
    point=Point(5.121311, 52.090648),
    tooltip="**Utrecht**",
    popup="**Utrecht**\nCity in the Netherlands\nPopulation: ~350k",
    caption="UTR",
)
m.to_html("hello.html")

Open hello.html in any browser and you're done.

Want the map as an image instead? Get raw PNG bytes or a buffer, no file needed:

png_bytes = m.to_image()   # bytes, for an HTTP response or an email attachment
buf = m.to_bytesio()       # io.BytesIO, e.g. for Flask/FastAPI/Django

See the Showcase for choropleths, heatmaps, clusters, drawing tools, and more — each as a live, interactive map — or work through the Tutorial one concept at a time.

Contributing

Issues and pull requests are welcome. To set up a local development environment:

git clone https://github.com/egarciamendez/mapyta
cd mapyta
uv sync --all-extras --all-groups
uv run pytest

Please open an issue to discuss substantial changes before starting.

License

This project is licensed under the terms of the MIT license.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mapyta-1.0.0.tar.gz (2.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mapyta-1.0.0-py3-none-any.whl (53.2 kB view details)

Uploaded Python 3

File details

Details for the file mapyta-1.0.0.tar.gz.

File metadata

  • Download URL: mapyta-1.0.0.tar.gz
  • Upload date:
  • Size: 2.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.31 {"installer":{"name":"uv","version":"0.11.31","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for mapyta-1.0.0.tar.gz
Algorithm Hash digest
SHA256 b971609b29e81d442a751e3a58a3e2eefb73cb76e8391c28488d7719e157c10b
MD5 2cc60a5913705527418cdd8905f91ff8
BLAKE2b-256 57faeda90f52c93d93903e2fb6e632e813257492e432e0b941c7020dc69a910b

See more details on using hashes here.

File details

Details for the file mapyta-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: mapyta-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 53.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.31 {"installer":{"name":"uv","version":"0.11.31","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for mapyta-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3bbbf9f627137e8236e1e4cd8b52e7b46460d2fe6edb3f77ebe6001f03e6c20c
MD5 b862793000c52391bda6314f781f0840
BLAKE2b-256 5a744fe39ee8c67b0701789b6a27360866700e18eb36d780b5efd25551260ee2

See more details on using hashes here.

Release history Release notifications | RSS feed

1.0.1

2 files

This release

1.0.0 This release

2 files

0.10.0

2 files

0.9.0

2 files

0.8.0

2 files

0.7.0

2 files

0.6.0

2 files

0.5.1

2 files

0.5.0

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page