New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

stadiamaps

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stadiamaps

Stadia Maps Geospatial APIs

6.0.0
PyPI
Maintainers
1

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.autocomplete_v2(text)
        print("The response of GeocodingApi->autocomplete:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling GeocodingApi->autocomplete_v2: %s\n" % e)

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

ClassMethodHTTP requestDescription
GeocodingApiautocompleteGET /geocoding/v1/autocompleteSearch and geocode quickly based on partial input.
GeocodingApiplaceGET /geocoding/v1/placeRetrieve details of a place using its GID.
GeocodingApireverseGET /geocoding/v1/reverseFind places and addresses near geographic coordinates (reverse geocoding).
GeocodingApisearchGET /geocoding/v1/searchSearch for location and other info using a place name or address (forward geocoding).
GeocodingApisearch_structuredGET /geocoding/v1/search/structuredFind locations matching components (structured forward geocoding).
GeocodingApisearch_bulkGET /geocoding/v1/search/bulkBulk geocoding.
GeospatialApielevationPOST /elevation/v1Get the elevation profile along a polyline or at a point.
GeospatialApitz_lookupGET /tz/lookup/v1Get the current time zone information for any point on earth.
RoutingApiisochronePOST /isochrone/v1Calculate areas of equal travel time from a location.
RoutingApimap_matchPOST /map_match/v1Match a recorded route to the road network.
RoutingApinearest_roadsPOST /nearest_roads/v1Find the nearest roads to the set of input locations.
RoutingApioptimized_routePOST /optimized_route/v1Calculate an optimized route between a known start and end point.
RoutingApiroutePOST /route/v1Get turn by turn routing instructions between two or more locations.
RoutingApitime_distance_matrixPOST /matrix/v1Calculate a time distance matrix for use in an optimizer.
RoutingApitrace_attributesPOST /trace_attributes/v1Trace the attributes of roads visited on a route.

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts