The Tilesets class provides access to the Mapbox Tilesets API. You can import it from either the mapbox module or the mapbox.services.tilesets module.
mapbox:
>>> from mapbox import Tilesetsmapbox.services.tilesets:
>>> from mapbox.services.tilesets import TilesetsSee https://www.mapbox.com/api-documentation/#tilesets for general documentation of the API.
Use of the Tilesets API requires an access token, which you should set in your environment. For more information, see the access tokens documentation.
The public method of the Tilesets class provides access to the Tilesets API and returns an instance of requests.Response.
Instantiate Tilesets.
>>> tilesets = Tilesets()Call the list method, passing in values for optional arguments as necessary - tileset_type, visibility, sortby, and limit.
>>> response = tilesets.list()Evaluate whether the request succeeded, and retrieve the tileset object from the response object.
>>> if response.status_code == 200:
... tileset_object = response.get_json()