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
pip install 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)
route_time, _ = list(results.values())[0]
return route_time
start = "50.00332659227126,8.262322651915843"
end = "50.08414976707619,8.247836017342934"
travel_time = asyncio.run(get_time(start, end))
print(travel_time)
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
pywaze-1.1.0.tar.gz
(118.1 kB
view details)
Built Distribution
File details
Details for the file pywaze-1.1.0.tar.gz
.
File metadata
- Download URL: pywaze-1.1.0.tar.gz
- Upload date:
- Size: 118.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c185d8cb172d4ecc04d9f118ddf69abd854413cf1be868e706eedef65c2528fb |
|
MD5 | 46635f667e9a199a6e0590d6f316a804 |
|
BLAKE2b-256 | 368ba1da4c00fa2d8df920f23d675b07e201f523426c8606c74be4be9af173a6 |
File details
Details for the file pywaze-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: pywaze-1.1.0-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6057f8c8afb25f0ad1e5a9c8a13837ae5b4df1f99edf575aee2e9eff4113b472 |
|
MD5 | 3f939f5b8a3bd90c7bf86df297457d5d |
|
BLAKE2b-256 | 86e1da144dce4aaea087d8bed4e00ebcded1bd4d03456f40b02c9d8bc273849d |