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
Installation & Usage
pip install
pip install stadiamaps
Setuptools
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install
to install the package for all users)
Tests
Execute pytest
to run the tests. These are run automatically via CI.
Getting Started
Please follow the installation procedure and then run the following:
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 by setting
# host to https://api-eu.stadiamaps.com.
# See configuration.py for a list of all supported configuration parameters.
configuration = stadiamaps.Configuration()
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization. This example assumes it is injected via an environment
# variable, but you can provide it in other ways as well.
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 = 'Põhja pst 27a' # 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(text)
print("The response of GeocodingApi->autocomplete:\n")
pprint(api_response)
except ApiException as e:
print("Exception when calling GeocodingApi->autocomplete: %s\n" % e)
Documentation for 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). |
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 a grid of start and end points. |
RoutingApi | trace_attributes | POST /trace_attributes/v1 | Trace the attributes of roads visited on a route. |
Documentation For Models
- Access
- AdminRegion
- Administrative
- AutoCostingOptions
- AutoCostingOptionsAllOf
- BaseCostingOptions
- BaseTraceRequest
- BicycleCostingOptions
- BicycleCostingOptionsAllOf
- BikeNetwork
- Contour
- Coordinate
- CostingModel
- CostingOptions
- DirectionsOptions
- DistanceUnit
- EdgeSign
- EdgeUse
- EndNode
- GeoAttributes
- GeoJSONGeometry
- GeoJSONGeometryBase
- GeoJSONLineString
- GeoJSONLineStringAllOf
- GeoJSONPoint
- GeoJSONPointAllOf
- GeoJSONPolygon
- GeoJSONPolygonAllOf
- GeocodingObject
- HeightRequest
- HeightResponse
- HighwayClassification
- IntersectingEdge
- IsochroneCostingModel
- IsochroneFeature
- IsochroneProperties
- IsochroneRequest
- IsochroneResponse
- LocateDetailedEdge
- LocateEdge
- LocateEdgeInfo
- LocateNode
- LocateNodeAllOf
- LocateObject
- ManeuverSign
- ManeuverSignElement
- MapMatchCostingModel
- MapMatchRequest
- MapMatchRequestAllOf
- MapMatchRouteResponse
- MapMatchRouteResponseAllOf
- MapMatchTraceOptions
- MapMatchWaypoint
- MapMatchWaypointAllOf
- MatchedPoint
- MatrixCostingModel
- MatrixDistance
- MatrixRequest
- MatrixResponse
- MotorScooterCostingOptions
- MotorScooterCostingOptionsAllOf
- MotorcycleCostingOptions
- MotorcycleCostingOptionsAllOf
- NearestRoadsRequest
- NodeId
- NodeType
- OptimizedRouteRequest
- PedestrianCostingOptions
- PeliasGeoJSONFeature
- PeliasGeoJSONProperties
- PeliasGeoJSONPropertiesAddendum
- PeliasGeoJSONPropertiesAddendumOsm
- PeliasLayer
- PeliasResponse
- PeliasResponseGeocoding
- PeliasSource
- Restrictions
- RoadClass
- RouteLeg
- RouteManeuver
- RouteRequest
- RouteResponse
- RouteResponseTrip
- RouteSummary
- RoutingResponseWaypoint
- RoutingResponseWaypointAllOf
- RoutingWaypoint
- RoutingWaypointAllOf
- RoutingWaypointAllOfSearchFilter
- SimpleRoutingWaypoint
- SimpleRoutingWaypointAllOf
- Speeds
- TraceAttributeFilterOptions
- TraceAttributeKey
- TraceAttributesBaseResponse
- TraceAttributesRequest
- TraceAttributesRequestAllOf
- TraceAttributesRequestAllOfFilters
- TraceAttributesResponse
- TraceAttributesResponseAllOf
- TraceEdge
- TravelMode
- Traversability
- TruckCostingOptions
- TruckCostingOptionsAllOf
- TzResponse
- ValhallaLanguages
- ValhallaLongUnits
- Warning
Documentation For Authorization
Authentication schemes defined for the API:
ApiKeyAuth
- Type: API key
- API key parameter name: api_key
- Location: URL query string
Development
This Python package is automatically generated by OpenAPI Generator.
To regenerate the package with an updated API spec, run the following command (make sure to replace
X.Y.Z
with the new version number!):
openapi-generator generate -i https://api.stadiamaps.com/openapi.yaml -g python-nextgen --strict-spec=true -o . -p disallowAdditionalPropertiesIfNotPresent=false -p packageName=stadiamaps -p packageUrl=https://docs.stadiamaps.com/ -p packageVersion=X.Y.Z
Caveats
The current release (6.6.0) of the generator's python
generator is broken, but python-nextgen
works.
The next release is scheduled to rename python-nextgen
to python
.
The auto-generated code (as of generator 6.6.0) does not pass flake8, so we have disabled the checks.
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
Hashes for stadiamaps-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94dc1ce6c90611007a6a5f562fc23c0cd2aca998132eaf2b2dca8e81f27ca256 |
|
MD5 | 01912f3277764d6ce0bf9c1815dbac4a |
|
BLAKE2b-256 | fb5c1e801fcb63d099ad12e3225c6994a4f286ebca4989c769426da2bfe8fa49 |