
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
A Python wrapper for the OLA Maps API, providing easy-to-use abstractions for developers.
Install the package using pip:
pip install olamaps
There are two ways to authenticate:
Using API key
os.environ["OLAMAPS_API_KEY"] = "your_api_key"
# OR
client = Client(api_key="your_api_key")
Or using client_id
and client_secret
os.environ["OLAMAPS_CLIENT_ID"] = "your_client_id"
os.environ["OLAMAPS_CLIENT_SECRET"] = "your_client_secret"
# OR
client = Client(client_id="your_client_id", client_secret="your_client_secret")
Follow the same steps for AsyncClient as well.
from olamaps import Client
# Initialize the client
client = Client()
# Autocomplete a query
results = client.autocomplete("Kempe")
# Geocode an address
results = client.geocode("MG Road, Bangalore")
# Reverse geocode a latitude-longitude pair
results = client.reverse_geocode(lat="12.9519408", lng="77.6381845")
# Get directions from one place to another
results = client.directions(
origin="12.993103152916301,77.54332622119354",
destination="12.972006793201695,77.5800850011884",
)
# close the client
client.close()
Or you can use the context manager, in which case you don't need to close the client manually:
with Client() as client:
results = client.autocomplete("Kempe")
Usage is very similar to Client, except that all methods are coroutines:
# use await for all methods
results = await client.autocomplete("Kempe")
# use await for closing the client
await client.close()
Also the context manager is async:
async with AsyncClient() as client:
results = await client.autocomplete("Kempe")
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
This project is not officially associated with or endorsed by OLA. Use of the OLA Maps API is subject to OLA's terms of service.
FAQs
Python client library for Ola Maps API Web Services
We found that olamaps demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.