Module to communicate to the EEVEE Mobility API
Project description
aioeeveemobility
The EEVEE Mobility Client is a Python library for interacting with the EEVEE Mobility API asynchronously using aiohttp.
Installation
You can install the EEVEE Mobility Client via pip:
pip install aioeeveemobility
Usage
"""Test for aioeeveemobility."""
from aioeeveemobility import EeveeMobilityClient
import asyncio
async def main():
client = EeveeMobilityClient(
"user@email.com",
"yourpassword",
)
try:
user = await client.request("user")
print(f"Hello {user.get('first_name')}")
fleets = await client.request(f"user/{user.get('id')}/fleets")
for fleet in fleets:
for entity in fleet.get('fleet').get('entities'):
if entity.get('id') == fleet.get('entity_id'):
break
print(f"Fleet: {fleet.get('fleet').get('name')}, {entity.get('name')} | Payout rate: {fleet.get('payout_rate').get('rate')} {fleet.get('payout_rate').get('currency_code')} {fleet.get('payout_rate').get('suffix')}")
cars = await client.request("cars")
for car in cars:
print(f"Your car: {car.get('display_name')} {car.get('license')}")
addresses = await client.request(f"cars/{car.get('id')}/addresses")
print("Addresses:")
for address in addresses:
print(f" > {address.get('name')}: {address.get('location')}")
events = await client.request(f"cars/{car.get('id')}/events")
print("Events:")
for event in events.get('data'):
print(event)
finally:
await client._close_session()
asyncio.run(main())
Contributing
Contributions are welcome! Please refer to the Contribution Guidelines for more information.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
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 aioeeveemobility-0.1.3.tar.gz.
File metadata
- Download URL: aioeeveemobility-0.1.3.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb8d5ebe3d2408d344f605ab8b0013255a6d2fb81750298542acb3a886d0c70c
|
|
| MD5 |
2e640da2a3ef1691d19ef85f58536b0b
|
|
| BLAKE2b-256 |
d49565b4e8c2b4084375b2f2fb8dd39944e749d10f1b7db3b236dc84de14d5e8
|
File details
Details for the file aioeeveemobility-0.1.3-py3-none-any.whl.
File metadata
- Download URL: aioeeveemobility-0.1.3-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1693addc23cee22164cd5f67760ef21fb93b3a5fbe9b193da0954eb45153b720
|
|
| MD5 |
d3dbdf337fa8dfa9e61585a8ed0e25d0
|
|
| BLAKE2b-256 |
fdc9dec1725e60a39e8ee3d3497180a369c98ba0a89db041c46ef08fc71ec31c
|