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.
Quick Start
Using xyzservices
is simple and in most cases does not involve more than a line of
code.
Installation
Note: Installation does not currently work as xyzservices
is not released yet.
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.
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file xyzservices-2021.7.tar.gz
.
File metadata
- Download URL: xyzservices-2021.7.tar.gz
- Upload date:
- Size: 26.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad7d2bddf29d2007bc1f181d15c953c4a19df76ec6f8120d18e454ce2f7f4959 |
|
MD5 | e5531633835dbb64c28bfe293e535d56 |
|
BLAKE2b-256 | 1b94a202fe3b2689043507679b1e8144600c11fd15aeec553c2d8e8139a60884 |
File details
Details for the file xyzservices-2021.7-py3-none-any.whl
.
File metadata
- Download URL: xyzservices-2021.7-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13175da215adf0714f9f57acdfa325d185f09ef520f62dcad1008dfd40cf9511 |
|
MD5 | 7faabab1f738a1c7aee58936afb226dc |
|
BLAKE2b-256 | 4593571583a5f63177b2911e667abc53cfb85dc834ebfe7d9989cf81efc00831 |