Asynchronous Waze client for calculating routes and travel times.
Project description
pywaze
Asynchronous Waze client for calculating routes and travel times.
Based on WazeRouteCalculator
Installation
uv add pywaze
Usage
#!/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:
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.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pywaze-1.2.0.tar.gz.
File metadata
- Download URL: pywaze-1.2.0.tar.gz
- Upload date:
- Size: 145.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e1a72fbe26b7f35649fa090f581afe5ea353db75181e2dafa6af7065f82b490
|
|
| MD5 |
c9726a4230e1b4914f7a2382124f4162
|
|
| BLAKE2b-256 |
e8ca0c2b0e6f0ec08023bf39f437feef1426896f67386d423d747311035f2ba9
|
File details
Details for the file pywaze-1.2.0-py3-none-any.whl.
File metadata
- Download URL: pywaze-1.2.0-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d2382134924826cb1d61757bf9c95d01166fd27cb279a9bad2f0d428f5e8b505
|
|
| MD5 |
73d27d568984d12e2b3f4c051dd11668
|
|
| BLAKE2b-256 |
4ce8e6c1ae384a454469db6715fdde68045ceb2337795680a86a276105f0bcca
|