xyzservices


Namexyzservices JSON
Version 2023.10.1 PyPI version JSON
download
home_pagehttps://github.com/geopandas/xyzservices
SummarySource of XYZ tiles providers
upload_time2023-10-26 11:23:22
maintainer
docs_urlNone
authorDani Arribas-Bel, Martin Fleischmann
requires_python>=3.8
license3-Clause BSD
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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](https://github.com/geopandas/xyzservices/actions/workflows/tests.yaml/badge.svg)](https://github.com/geopandas/xyzservices/actions/workflows/tests.yaml) [![codecov](https://codecov.io/gh/geopandas/xyzservices/branch/main/graph/badge.svg?token=PBSZQA48GY)](https://codecov.io/gh/geopandas/xyzservices)

## 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`:

```shell
conda install xyzservices -c conda-forge
```

```shell
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:

```py
>>> 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:

```py
>>> 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.

```py
>>> 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`](https://github.com/geopandas) GitHub organization. You can see a full list
of contributors [here](https://github.com/geopandas/xyzservices/graphs/contributors).

The main group of providers is retrieved from the [`leaflet-providers`
project](https://github.com/leaflet-extras/leaflet-providers) that contains both openly
accessible providers as well as those requiring registration. All of them are considered
[free](https://github.com/leaflet-extras/leaflet-providers/blob/master/README.md#what-do-we-mean-by-free).

If you would like to contribute to the project, have a look at the list of
[open issues](https://github.com/geopandas/contextily/issues), particularly those labeled as
[good first issue](https://github.com/geopandas/xyzservices/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22).

## License

BSD 3-Clause License

Resources coming from the [`leaflet-providers`
project](https://github.com/leaflet-extras/leaflet-providers) are licensed under BSD
2-Clause License (© 2013 Leaflet Providers)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/geopandas/xyzservices",
    "name": "xyzservices",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "",
    "author": "Dani Arribas-Bel, Martin Fleischmann",
    "author_email": "daniel.arribas.bel@gmail.com, martin@martinfleischmann.net",
    "download_url": "https://files.pythonhosted.org/packages/70/6a/6c0f3b2269d0b6f25013987a044de70a9af78280cf589c1056642f1f715e/xyzservices-2023.10.1.tar.gz",
    "platform": null,
    "description": "# xyzservices - Source of XYZ tiles providers\n\n`xyzservices` is a lightweight library providing a repository of available XYZ services\noffering raster basemap tiles. The repository is provided via Python API and as a\ncompressed JSON file.\n\nXYZ tiles can be used as background for your maps to provide necessary spatial context.\n`xyzservices` offer specifications of many tile services and provide an easy-to-use\ntools to plug them into your work, no matter if interactive or static.\n\n[![Tests](https://github.com/geopandas/xyzservices/actions/workflows/tests.yaml/badge.svg)](https://github.com/geopandas/xyzservices/actions/workflows/tests.yaml) [![codecov](https://codecov.io/gh/geopandas/xyzservices/branch/main/graph/badge.svg?token=PBSZQA48GY)](https://codecov.io/gh/geopandas/xyzservices)\n\n## Quick Start\n\nUsing `xyzservices` is simple and in most cases does not involve more than a line of\ncode.\n\n### Installation\n\nYou can install `xyzservices` from `conda` or `pip`:\n\n```shell\nconda install xyzservices -c conda-forge\n```\n\n```shell\npip install xyzservices\n```\n\nThe package does not depend on any other apart from those built-in in Python.\n\n### Providers API\n\nThe key part of `xyzservices` are providers:\n\n```py\n>>> import xyzservices.providers as xyz\n```\n\n`xyzservices.providers` or just `xyz` for short is a `Bunch` of providers, an enhanced\n`dict`. If you are in Jupyter-like environment, `xyz` will offer collapsible inventory\nof available XYZ tile sources. You can also explore it as a standard `dict` using\n`xyz.keys()`. Once you have picked your provider, you get its details as a\n`TileProvider` object with all the details you may need:\n\n```py\n>>> xyz.CartoDB.Positron.url\n'https://{s}.basemaps.cartocdn.com/{variant}/{z}/{x}/{y}{r}.png'\n\n>>> xyz.CartoDB.Positron.attribution\n'(C) OpenStreetMap contributors (C) CARTO'\n```\n\nYou can also check if the `TileProvider` needs API token and pass it to the object if\nneeded.\n\n```py\n>>> xyz.MapBox.requires_token()\nTrue\n\n>>> xyz.MapBox[\"accessToken\"] = \"my_personal_token\"\n>>> xyz.MapBox.requires_token()\nFalse\n```\n\n### Providers JSON\n\nAfter the installation, you will find the JSON used as a database of providers in\n`share/xyzservices/providers.json` if you want to use it outside of a Python ecosystem.\n\n## Contributors\n\n`xyzservices` is developed by a community of enthusiastic volunteers and lives under\n[`geopandas`](https://github.com/geopandas) GitHub organization. You can see a full list\nof contributors [here](https://github.com/geopandas/xyzservices/graphs/contributors).\n\nThe main group of providers is retrieved from the [`leaflet-providers`\nproject](https://github.com/leaflet-extras/leaflet-providers) that contains both openly\naccessible providers as well as those requiring registration. All of them are considered\n[free](https://github.com/leaflet-extras/leaflet-providers/blob/master/README.md#what-do-we-mean-by-free).\n\nIf you would like to contribute to the project, have a look at the list of\n[open issues](https://github.com/geopandas/contextily/issues), particularly those labeled as\n[good first issue](https://github.com/geopandas/xyzservices/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22).\n\n## License\n\nBSD 3-Clause License\n\nResources coming from the [`leaflet-providers`\nproject](https://github.com/leaflet-extras/leaflet-providers) are licensed under BSD\n2-Clause License (\u00a9 2013 Leaflet Providers)\n",
    "bugtrack_url": null,
    "license": "3-Clause BSD",
    "summary": "Source of XYZ tiles providers",
    "version": "2023.10.1",
    "project_urls": {
        "Homepage": "https://github.com/geopandas/xyzservices"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "82c3e06dfa46464cce3eda4b86df8847cab99d9bc545c76807ee689545187a4c",
                "md5": "263cd4016dbe835e11406406ea8168b4",
                "sha256": "6a4c38d3a9f89d3e77153eff9414b36a8ee0850c9e8b85796fd1b2a85b8dfd68"
            },
            "downloads": -1,
            "filename": "xyzservices-2023.10.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "263cd4016dbe835e11406406ea8168b4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 56286,
            "upload_time": "2023-10-26T11:23:19",
            "upload_time_iso_8601": "2023-10-26T11:23:19.986825Z",
            "url": "https://files.pythonhosted.org/packages/82/c3/e06dfa46464cce3eda4b86df8847cab99d9bc545c76807ee689545187a4c/xyzservices-2023.10.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "706a6c0f3b2269d0b6f25013987a044de70a9af78280cf589c1056642f1f715e",
                "md5": "94abc04a76c3f353bff2d82a37cc0ba5",
                "sha256": "091229269043bc8258042edbedad4fcb44684b0473ede027b5672ad40dc9fa02"
            },
            "downloads": -1,
            "filename": "xyzservices-2023.10.1.tar.gz",
            "has_sig": false,
            "md5_digest": "94abc04a76c3f353bff2d82a37cc0ba5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 1116744,
            "upload_time": "2023-10-26T11:23:22",
            "upload_time_iso_8601": "2023-10-26T11:23:22.015632Z",
            "url": "https://files.pythonhosted.org/packages/70/6a/6c0f3b2269d0b6f25013987a044de70a9af78280cf589c1056642f1f715e/xyzservices-2023.10.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-26 11:23:22",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "geopandas",
    "github_project": "xyzservices",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "xyzservices"
}
        
Elapsed time: 0.13431s