aioweenect-1.1.1
توضیحات
Asynchronous Python client for the weenect API
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | aioweenect-1.1.1 |
| نام | aioweenect |
| نسخه کتابخانه | 1.1.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Kevin Stillhammer |
| ایمیل نویسنده | kevin.stillhammer@gmail.com |
| آدرس صفحه اصلی | http://github.com/eifinger/aioweenect |
| آدرس اینترنتی | https://pypi.org/project/aioweenect/ |
| مجوز | MIT |
# aioweenect
Asynchronous Python client for the weenect API
[](https://github.com/eifinger/aioweenect/actions?workflow=CI)
[](https://pypi.python.org/pypi/aioweenect)
[](https://github.com/eifinger/aioweenect/blob/master/LICENSE)
[](https://codecov.io/gh/eifinger/aioweenect)
[](https://pepy.tech/project/aioweenect)
## Installation
```bash
$ pip install aioweenect
```
## Usage
```python
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())
```
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.8,<4.0 | Python |
نحوه نصب
نصب پکیج whl aioweenect-1.1.1:
pip install aioweenect-1.1.1.whl
نصب پکیج tar.gz aioweenect-1.1.1:
pip install aioweenect-1.1.1.tar.gz