Home Assistant Python 3 API wrapper for MovingIntelligence
Project description
Python: Moving Intelligence
Home Assistant Python 3 API wrapper for Moving Intelligence asset and fleet management
About
This package allows the Home Assistant integration 'moving_intelligence' to get get data from https://movingintelligence.com/en/.
NOTE: You need a login account together with an apikey to be able to use it.
Installation
pip3 install pymovingintelligence_ha
Example code
#!/usr/bin/env python3
from pymovingintelligence_ha import MovingIntelligence
from pymovingintelligence_ha.utils import InvalidAuthError, InvalidPermissionsError
import asyncio
import logging
from aiohttp import ClientSession
logger = logging.getLogger(__name__)
logging.basicConfig(level=logging.DEBUG)
async def async_main():
api = MovingIntelligence(
username="YOUR USERNAME",
apikey="YOUR API-KEY"
)
try:
devices = await api.get_devices()
for device in devices:
print(device.data)
except InvalidPermissionsError:
logger.error("No permission")
except:
logger.error("ConnectionError: Could not connect to MovingIntelligence")
asyncio.run(async_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
File details
Details for the file pymovingintelligence_ha-0.0.11.tar.gz
.
File metadata
- Download URL: pymovingintelligence_ha-0.0.11.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.0.1 pkginfo/1.4.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1e586aea57403a0885a71433e9d671634ffbc92b81407a6533eb811123a18cb |
|
MD5 | b4b89e5ec27f9f2aacf2650ff063c42f |
|
BLAKE2b-256 | ed72bdada5ee8a272e96fd3197e807b2835bd24d2dda9fde909763ccfd17062c |