Created: 2011-07-11 21:20
Updated: 2018-09-25 02:27
License: mit

mapython is a toolkit for rendering maps based on OpenStreetMap data. It is released under the MIT license and is entirely written in Python.


import os
os.environ['MAPYTHON_DB_URL'] = \
from mapython.render import Renderer
from mapython.draw import Map

bbox = (11.4, 48.3, 11.9, 48.6)

mapobj = Map('map.png', bbox)
renderer = Renderer(mapobj)


If you have ideas for improving mapython or found a bug, check out mapython's GitHub repository. mapython is under active development and any contribution is welcome.


  • simple and intuitive style definitions in YAML
  • pure Python code base (with fast underlying C/C++ libraries)
  • easily extensible and customizable
  • bitmap and vector graphics as output format
  • support for custom map projections


mapython is under active development and comparatively new, therefore it still has some limitations.

  • there is only limited support for rendering bridges and tunnels correctly
  • only the data format provided by "osm2pgsql" is supported
Cookies help us deliver our services. By using our services, you agree to our use of cookies Learn more