--- id: contextily version: "1.7.1" license: BSD-3-Clause license_treatment: permissive maintenance: active --- # contextily — Context geo-tiles in Python License: permissive · Maintenance: active · Downloads: 667.8K/mo ## What it is and what it does Contextily is a lightweight Python package that fetches map tiles from web services and integrates them into matplotlib visualizations or saves them as geospatial raster files. It abstracts away the complexity of tile coordinate systems, allowing you to work in either WGS84 (latitude/longitude) or Spheric Mercator (Web Mercator) projections. The package leverages xyzservices to provide access to popular tile providers including OpenStreetMap and Stamen Design variants. Typically used in geospatial analysis workflows, contextily lets you quickly add geographic context to plots without managing tile URLs or coordinate transformations manually. It handles the download, caching, and reprojection of tiles, making it straightforward to create publication-ready maps with minimal code. The package is actively maintained and supports modern Python versions (3.10 and above). Use it for: - Add OpenStreetMap or Stamen Design basemaps to matplotlib plots for geographic data visualization. - Export downloaded map tiles as GeoTIFF or other raster formats for offline use or further processing. - Quickly prototype geospatial analyses by overlaying vector data on contextual map imagery. - Create web-ready map visualizations by combining local geospatial datasets with standard tile providers. - Support coordinate system conversions between WGS84 and Web Mercator when working with tile-based services. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Contextily retrieves tile-based map imagery from the internet and overlays it as a basemap on matplotlib figures or exports it to geospatial raster files, supporting both WGS84 and Spheric Mercator coordinate systems. Yes. Contextily is actively maintained, has no known vulnerabilities, low install friction, and solves a common need in geospatial Python workflows. If you work with matplotlib and geographic data and need quick access to map tiles, it is a straightforward, well-integrated choice. ## Install pip install contextily uv add contextily poetry add contextily ## Installing contextily Before you install: Low friction: pure Python wheel, active maintenance (last commit 2026-07-27), and a straightforward dependency stack of well-established geospatial and visualization libraries. Requires Python 3.10 or above. License in practice: BSD-3-Clause is permissive; you can use, modify, and distribute contextily with minimal restrictions in commercial or private projects. Quickstart: pip install contextily import contextily as ctx import matplotlib.pyplot as plt ax = plt.gca() ctx.add_basemap(ax, crs='EPSG:3857') plt.show() Requires Python 3.10 or above; rasterio and pillow have optional compiled dependencies on some platforms. Verify before relying: - Whether xyzservices provider list is kept current and how often it is updated. - Performance characteristics when working with large geographic areas or high-resolution tiles. - Whether all Stamen Design tile variants (Toner, Terrain, Watercolor) remain available and stable. ## Package facts - License: BSD-3-Clause (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 667.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags tile basemap matplotlib, openstreetmap tiles python, geospatial raster tiles, map tiles download, contextual map layers, web map tiles geospatial, stamen tiles python, geospatial, cartography, web-tiles [View on SkillFed](https://skillfed.io/packages/contextily) · [View on PyPI](https://pypi.org/project/contextily/)