skillfed

xyzservices

Source of XYZ tiles providers

xyzservices v2026.3.0 10.2M downloads/30d#1,475 on PyPI229
Permissive license BSD-3-Clause Active released

What it is and what it does

xyzservices is a lightweight repository of XYZ tile service specifications—URLs, attribution strings, and metadata for raster basemap tile providers. It exposes this data through a Python API (a dict-like Bunch object) and as a compressed JSON file, making it easy to discover and configure tile sources for mapping applications.

The package is designed for developers building interactive or static maps who need to reference standard tile providers like CartoDB, OpenStreetMap, or MapBox. It handles the bookkeeping of provider URLs, required attribution, and token requirements, so you don't have to maintain your own list. Since it has no external runtime dependencies, it installs cleanly and integrates into any Python mapping workflow.

Use it for:

  • Populate a map application with a curated list of basemap tile options without hardcoding provider URLs.
  • Look up correct attribution strings and usage terms for tile services in your mapping code.
  • Configure token-based tile providers (e.g., MapBox) by setting credentials on provider objects.
  • Export the embedded providers.json file for use in non-Python mapping tools or web applications.
  • Build a tile provider selector UI by iterating over the available providers in a Jupyter notebook.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides a Python API and JSON database of XYZ tile service providers for use as raster basemap tiles in maps, with no external runtime dependencies.

Yes. xyzservices is a lightweight, zero-dependency utility that solves a real problem—centralizing tile provider metadata—for anyone building maps in Python. It's actively maintained, permissively licensed, and popular in the geospatial community. Install it if you're using tile-based maps and want a reliable reference for provider URLs and attribution.

Install

xyzservices on PyPI

pip

pip install xyzservices

uv

uv add xyzservices

poetry

poetry add xyzservices

Installing xyzservices

Before you install

Straightforward install with no runtime dependencies beyond Python itself. The package is actively maintained with a recent release (137 days ago) and lives in the geopandas organization on GitHub.

License in practice

BSD-3-Clause license is permissive; you can use this in commercial and proprietary projects. Note that provider data sourced from leaflet-providers is separately licensed under BSD-2-Clause.

Quickstart

pip install xyzservices

import xyzservices.providers as xyz
url = xyz.CartoDB.Positron.url
attribution = xyz.CartoDB.Positron.attribution

Requires Python 3.8 or later.

Verify before relying

  • Whether the embedded providers.json file is updated regularly and how users stay current with new tile services.
  • Performance characteristics when working with the full provider inventory in memory.
  • Whether token-based providers (like MapBox) require additional setup beyond setting the accessToken attribute.

Package facts

License BSD-3-Clause (permissive)
Python support supports the current Python release (>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance actively maintained — 137 days since the last release
Last repo commit
First released
Downloads 10,172,772/month — #1,475 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: xyzservices-2026.3.0-py3-none-any.whl

Programming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.8

Tags

xyz tile providersbasemap tile servicesraster tile repositorymap tile sourcescartography tile catalogleaflet providers pythontile service specifications
cartographygeospatialmapping

More WWW/HTTP packages