Skip to main content

A Python client for Mapbox services

Project description

https://travis-ci.org/mapbox/mapbox-sdk-py.png?branch=master https://coveralls.io/repos/mapbox/mapbox-sdk-py/badge.png

A Python client for Mapbox web services

The Mapbox Python SDK is a low-level client API, not a Resource API such as the ones in boto3 or github3.py. Its methods return objects containing HTTP responses from the Mapbox API.

Services

  • Analytics V1 examples, website

    • API usage for services by resource.

    • available for premium and enterprise plans.

  • Directions V5 examples, website

    • Profiles for driving, walking, and cycling

    • GeoJSON & Polyline formatting

  • Distance V1 DEPRECATED

  • Geocoding V5 examples, website

    • Forward (place names ⇢ longitude, latitude)

    • Reverse (longitude, latitude ⇢ place names)

  • Map Matching V4 examples, website

    • Snap GPS traces to OpenStreetMap data

  • Static Maps V4 examples, website

    • Generate standalone images from existing Mapbox mapids (tilesets)

    • Render with GeoJSON overlays

  • Static Styles V1 examples, website

    • Generate standalone images from existing Mapbox styles

    • Render with GeoJSON overlays

    • Adjust pitch and bearing, decimal zoom levels

  • Surface V4 examples, website

    • Interpolates values along lines. Useful for elevation traces.

  • Uploads V1 examples, website

    • Upload data to be processed and hosted by Mapbox.

  • Datasets V1 examples, website

    • Manage editable collections of GeoJSON features

    • Persistent storage for custom geographic data

  • Tilequery V4 examples, website

    • Retrieve data about specific features from a vector tileset

  • Maps V4 examples, website

    • Retrieve an image tile, vector tile, or UTFGrid in the specified format

    • Retrieve vector features from Mapbox Editor projects as GeoJSON or KML

    • Retrieve TileJSON metadata for a tileset

    • Retrieve a single marker image without any background map

Please note that there may be some lag between the release of new Mapbox web services and releases of this package.

Documentation

Please see https://mapbox-mapbox.readthedocs-hosted.com/en/latest/

Installation

$ pip install mapbox

Testing

pip install -e .[test]
python -m pytest

To run the examples as integration tests on your own Mapbox account

MAPBOX_ACCESS_TOKEN="MY_ACCESS_TOKEN" python -m pytest --doctest-glob='*.md' docs/*.md

See Also

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

mapbox-0.18.0.tar.gz (22.6 kB view details)

Uploaded Source

Built Distribution

mapbox-0.18.0-py2.py3-none-any.whl (30.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file mapbox-0.18.0.tar.gz.

File metadata

  • Download URL: mapbox-0.18.0.tar.gz
  • Upload date:
  • Size: 22.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.3

File hashes

Hashes for mapbox-0.18.0.tar.gz
Algorithm Hash digest
SHA256 3e9a098524a6b855f39fd5e773fb21526ef9660291f12b147e98fd44c7573e0b
MD5 7e5a55af6054f9d0681313855814512c
BLAKE2b-256 8d8af3aa1d2f67929dc9af7f88cb083ef8f468d42976a92c3589891640c909f7

See more details on using hashes here.

File details

Details for the file mapbox-0.18.0-py2.py3-none-any.whl.

File metadata

  • Download URL: mapbox-0.18.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 30.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.3

File hashes

Hashes for mapbox-0.18.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ad40585f1745a1a60e9ea1c0dbe6cd969751b92e38926c93324d812356f68cb5
MD5 f22975a8326764a698cb342c700595fe
BLAKE2b-256 5bde8dbc8e6615e2b09159efe698116d652e2d6867c71f5ae86745ff3e495ec5

See more details on using hashes here.

Supported by

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