https://github.com/eifinger/pywaze
Asynchronous Waze client for calculating routes and travel times.
https://github.com/eifinger/pywaze
hacktoberfest python traffic waze
Last synced: 3 months ago
JSON representation
Asynchronous Waze client for calculating routes and travel times.
- Host: GitHub
- URL: https://github.com/eifinger/pywaze
- Owner: eifinger
- License: mit
- Created: 2023-08-06T19:27:13.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2026-03-02T10:42:47.000Z (4 months ago)
- Last Synced: 2026-03-02T14:30:53.934Z (4 months ago)
- Topics: hacktoberfest, python, traffic, waze
- Language: Python
- Homepage:
- Size: 464 KB
- Stars: 13
- Watchers: 1
- Forks: 3
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pywaze
Asynchronous Waze client for calculating routes and travel times.
Based on [WazeRouteCalculator](https://github.com/kovacsbalu/WazeRouteCalculator)
## Installation
```console
uv add pywaze
```
## Usage
```python
#!/usr/bin/env python3
import asyncio
from pywaze import route_calculator
async def get_time(start: str, end: str) -> float:
"""Return the travel time home."""
async with route_calculator.WazeRouteCalculator() as client:
results = await client.calc_routes(start, end)
first_route = results[0]
return first_route.duration
start = "50.00332659227126,8.262322651915843"
end = "50.08414976707619,8.247836017342934"
travel_time = asyncio.run(get_time(start, end))
print(travel_time)
```
### Address resolving base coordinates
When one or both endpoints are addresses, `calc_routes()` resolves them via Waze search.
You can provide custom base coordinates to make sure Waze tries to resolve the address near those coordinates:
```python
await client.calc_routes(start, end, base_coords=(48.137154, 11.576124))
```
If `base_coords` is omitted and exactly one endpoint is already coordinates,
that coordinate endpoint is used automatically as base coordinates for
resolving the address.
---
[
](https://www.buymeacoffee.com/eifinger)
[
](https://paypal.me/kevinstillhammer)