Skip to main content

Source of XYZ tiles providers

Project description

xyzservices - Source of XYZ tiles providers

xyzservices is a lightweight library providing a repository of available XYZ services offering raster basemap tiles. The repository is provided via Python API and as a compressed JSON file.

XYZ tiles can be used as background for your maps to provide necessary spatial context. xyzservices offer specifications of many tile services and provide an easy-to-use tools to plug them into your work, no matter if interactive or static.

Tests codecov

Quick Start

Using xyzservices is simple and in most cases does not involve more than a line of code.

Installation

You can install xyzservices from conda or pip:

conda install xyzservices -c conda-forge
pip install xyzservices

The package does not depend on any other apart from those built-in in Python.

Providers API

The key part of xyzservices are providers:

>>> import xyzservices.providers as xyz

xyzservices.providers or just xyz for short is a Bunch of providers, an enhanced dict. If you are in Jupyter-like environment, xyz will offer collapsible inventory of available XYZ tile sources. You can also explore it as a standard dict using xyz.keys(). Once you have picked your provider, you get its details as a TileProvider object with all the details you may need:

>>> xyz.CartoDB.Positron.url
'https://{s}.basemaps.cartocdn.com/{variant}/{z}/{x}/{y}{r}.png'

>>> xyz.CartoDB.Positron.attribution
'(C) OpenStreetMap contributors (C) CARTO'

You can also check if the TileProvider needs API token and pass it to the object if needed.

>>> xyz.MapBox.requires_token()
True

>>> xyz.MapBox["accessToken"] = "my_personal_token"
>>> xyz.MapBox.requires_token()
False

Providers JSON

After the installation, you will find the JSON used as a database of providers in share/xyzservices/providers.json if you want to use it outside of a Python ecosystem.

Contributors

xyzservices is developed by a community of enthusiastic volunteers and lives under geopandas GitHub organization. You can see a full list of contributors here.

The main group of providers is retrieved from the leaflet-providers project that contains both openly accessible providers as well as those requiring registration. All of them are considered free.

If you would like to contribute to the project, have a look at the list of open issues, particularly those labeled as good first issue.

License

BSD 3-Clause License

Resources coming from the leaflet-providers project are licensed under BSD 2-Clause License (© 2013 Leaflet Providers)

Project details


Download files

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

Source Distribution

xyzservices-2022.1.0.tar.gz (40.8 kB view details)

Uploaded Source

Built Distribution

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

xyzservices-2022.1.0-py3-none-any.whl (35.4 kB view details)

Uploaded Python 3

File details

Details for the file xyzservices-2022.1.0.tar.gz.

File metadata

  • Download URL: xyzservices-2022.1.0.tar.gz
  • Upload date:
  • Size: 40.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for xyzservices-2022.1.0.tar.gz
Algorithm Hash digest
SHA256 9520dea97f67b8ed444a6263db33e2bac4e0976b77fa487ddb71b618775205a4
MD5 276ca2cce0c01b8e1c08d1c8b5b34de7
BLAKE2b-256 f7c15b15ef2993034655528d04881954595294c2d935606c50ea094f1652c937

See more details on using hashes here.

File details

Details for the file xyzservices-2022.1.0-py3-none-any.whl.

File metadata

  • Download URL: xyzservices-2022.1.0-py3-none-any.whl
  • Upload date:
  • Size: 35.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for xyzservices-2022.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 77a5de81435cb11887a3d55830b80a1ed7b489bbf22f9b699f8d120a93549e7a
MD5 50ca45065d57af76dbaff71d60565bc6
BLAKE2b-256 bc8e7084cc2f378deca5083cdd08a239be6ce75d6a26d31f566525233d3111ef

See more details on using hashes here.

Supported by

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