Asynchronous Python client for the weenect API
Project description
aioweenect
Asynchronous Python client for the weenect API
Installation
$ pip install aioweenect
Usage
from aioweenect import AioWeenect
import asyncio
USER = "<YOUR_USER>"
PASSWORD = "<YOUR_PASSWORD>"
async def main():
"""Show example how to get location of your tracker."""
async with AioWeenect(username=USER, password=PASSWORD) as aioweenect:
trackers_response = await aioweenect.get_trackers()
tracker_id = trackers_response["items"][0]["id"]
tracker_name = trackers_response["items"][0]["name"]
position_response = await aioweenect.get_position(tracker_id=tracker_id)
lat = position_response[0]["latitude"]
lon = position_response[0]["longitude"]
last_message = position_response[0]["last_message"]
print(
f"Location for {tracker_name}: lat: {lat}, lon: {lon}. Last message received: {last_message}"
)
if __name__ == "__main__":
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
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
aioweenect-1.1.7.tar.gz
(137.3 kB
view details)
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 aioweenect-1.1.7.tar.gz.
File metadata
- Download URL: aioweenect-1.1.7.tar.gz
- Upload date:
- Size: 137.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","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 |
9899521299826e0021116e2ed476cfc02af117b6052547690f3d25732c37bd76
|
|
| MD5 |
1b2324ee2ff9a7d0cc331cc3c7577371
|
|
| BLAKE2b-256 |
ddd80949d29d141266ab4a91f56e16831addc0e020843499094fb19069e84213
|
File details
Details for the file aioweenect-1.1.7-py3-none-any.whl.
File metadata
- Download URL: aioweenect-1.1.7-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","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 |
9455ce12fbfe1b8293124f4f6a32ec418cdb4291ba7cf8ffeddfed598e7bd6e6
|
|
| MD5 |
8919d1b15f40d97bbc1ea43be3f1f50f
|
|
| BLAKE2b-256 |
72289680533180599f61da73afdeee0b63a43beae9fff1d423778f957b3c02b6
|