Stadia Maps Geospatial APIs
Project description
Stadia Maps Python API Client
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
For more information about the API, please visit https://docs.stadiamaps.com
Requirements.
Python 3.8+
Installation & Usage
You can install via your favorite package manager. For example:
pip
pip install stadiamaps
poetry
poetry add stadiamaps
Tests
Execute pytest
to run the tests. These are run automatically via CI.
Getting Started
After following the installation procedure, you'll need a Stadia Maps API key.
You can create an API key for free here (no credit card required).
import os
import stadiamaps
from stadiamaps.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.stadiamaps.com
# You can also use our EU endpoint to keep traffic within the EU like so:
# configuration = stadiamaps.Configuration(host="https://api-eu.stadiamaps.com")
# See configuration.py for a list of all supported configuration parameters.
configuration = stadiamaps.Configuration()
# Configure API key authorization. This example assumes it is injected via an environment
# variable.
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]
# Enter a context with an instance of the API client
with stadiamaps.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = stadiamaps.GeocodingApi(api_client)
text = "Kursi 3" # str | The place name (address, venue name, etc.) to search for.
try:
# Search and geocode quickly based on partial input.
api_response = api_instance.search_v2(text, lang="en")
print("The response of GeocodingApi->autocomplete:\n")
pprint(api_response)
except ApiException as e:
print("Exception when calling GeocodingApi->autocomplete_v2: %s\n" % e)
Check out our integration test folder for more examples.
Documentation
Official documentation lives at docs.stadiamaps.com, where we have both long-form prose explanations of each endpoint and an interactive API reference.
You can also find auto-generated class references below.
API Endpoints
All URIs are relative to https://api.stadiamaps.com
Class | Method | HTTP request | Description |
---|---|---|---|
GeocodingApi | autocomplete | GET /geocoding/v1/autocomplete | Search and geocode quickly based on partial input. |
GeocodingApi | place | GET /geocoding/v1/place | Retrieve details of a place using its GID. |
GeocodingApi | reverse | GET /geocoding/v1/reverse | Find places and addresses near geographic coordinates (reverse geocoding). |
GeocodingApi | search | GET /geocoding/v1/search | Search for location and other info using a place name or address (forward geocoding). |
GeocodingApi | search_structured | GET /geocoding/v1/search/structured | Find locations matching components (structured forward geocoding). |
GeocodingApi | search_bulk | GET /geocoding/v1/search/bulk | Bulk geocoding. |
GeospatialApi | elevation | POST /elevation/v1 | Get the elevation profile along a polyline or at a point. |
GeospatialApi | tz_lookup | GET /tz/lookup/v1 | Get the current time zone information for any point on earth. |
RoutingApi | isochrone | POST /isochrone/v1 | Calculate areas of equal travel time from a location. |
RoutingApi | map_match | POST /map_match/v1 | Match a recorded route to the road network. |
RoutingApi | nearest_roads | POST /nearest_roads/v1 | Find the nearest roads to the set of input locations. |
RoutingApi | optimized_route | POST /optimized_route/v1 | Calculate an optimized route between a known start and end point. |
RoutingApi | route | POST /route/v1 | Get turn by turn routing instructions between two or more locations. |
RoutingApi | time_distance_matrix | POST /matrix/v1 | Calculate a time distance matrix for use in an optimizer. |
RoutingApi | trace_attributes | POST /trace_attributes/v1 | Trace the attributes of roads visited on a route. |
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 stadiamaps-7.0.1.tar.gz
.
File metadata
- Download URL: stadiamaps-7.0.1.tar.gz
- Upload date:
- Size: 172.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
0caea08f299d2ba042924e9221a38a58c1e6064204829467555cc6d581cf0dde
|
|
MD5 |
81a2ed75d3beac3d302fb611dba4250f
|
|
BLAKE2b-256 |
1e901405689fd5e475d7cbed2d05c9577300d26a5b1d67a80ef4ef7908d3ed9c
|
Provenance
The following attestation bundles were made for stadiamaps-7.0.1.tar.gz
:
Publisher:
publish.yml
on stadiamaps/stadiamaps-api-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1
-
Predicate type:
https://docs.pypi.org/attestations/publish/v1
-
Subject name:
stadiamaps-7.0.1.tar.gz
-
Subject digest:
0caea08f299d2ba042924e9221a38a58c1e6064204829467555cc6d581cf0dde
- Sigstore transparency entry: 236901381
- Sigstore integration time:
-
Permalink:
stadiamaps/stadiamaps-api-py@d16be470a873bbff65e0beb89ed61d4aa64c8826
-
Branch / Tag:
refs/tags/v7.0.1
- Owner: https://github.com/stadiamaps
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com
-
Runner Environment:
github-hosted
-
Publication workflow:
publish.yml@d16be470a873bbff65e0beb89ed61d4aa64c8826
-
Trigger Event:
release
-
Statement type:
File details
Details for the file stadiamaps-7.0.1-py3-none-any.whl
.
File metadata
- Download URL: stadiamaps-7.0.1-py3-none-any.whl
- Upload date:
- Size: 346.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
ac88f1ad56385e67d7bc751c919541ad2c9c1182fbc7f029d17ec48396e31ce8
|
|
MD5 |
8ab8e3f83c44c0edef9774a971bb3e45
|
|
BLAKE2b-256 |
386d556cd1a2aa41063d57de1e5e05c76c843dd36f3f05edc005e0ee49ac8aeb
|
Provenance
The following attestation bundles were made for stadiamaps-7.0.1-py3-none-any.whl
:
Publisher:
publish.yml
on stadiamaps/stadiamaps-api-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1
-
Predicate type:
https://docs.pypi.org/attestations/publish/v1
-
Subject name:
stadiamaps-7.0.1-py3-none-any.whl
-
Subject digest:
ac88f1ad56385e67d7bc751c919541ad2c9c1182fbc7f029d17ec48396e31ce8
- Sigstore transparency entry: 236901391
- Sigstore integration time:
-
Permalink:
stadiamaps/stadiamaps-api-py@d16be470a873bbff65e0beb89ed61d4aa64c8826
-
Branch / Tag:
refs/tags/v7.0.1
- Owner: https://github.com/stadiamaps
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com
-
Runner Environment:
github-hosted
-
Publication workflow:
publish.yml@d16be470a873bbff65e0beb89ed61d4aa64c8826
-
Trigger Event:
release
-
Statement type: