XSense Python Module
Project description
Python-xsense is a small library to interact with the API of XSense Home Security. It allows to retrieve the status of various devices and the basestation.
Example sync usage
>>> from xsense import XSense >>> from xsense.utils import dump_environment >>> api = XSense() >>> api.init() >>> api.login(username, password) >>> api.load_all() >>> for _, h in api.houses.items(): >>> for _, s in h.stations.items(): >>> api.get_state(s) >>> dump_environment(api)
Example async usage
>>> import asyncio >>> from xsense import AsyncXSense >>> from xsense.utils import dump_environment >>> >>> async def run(username: str, password: str): >>> api = AsyncXSense() >>> await api.init() >>> await api.login(username, password) >>> for _, h in api.houses.items(): >>> for _, s in h.stations.items(): >>> await api.get_state(s) >>> dump_environment(api) >>> >>> asyncio.run(run(username, password))
Development
This library is in an early development stage and created primarily to make an integration for home assistant.
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
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 python-xsense-0.0.10.tar.gz.
File metadata
- Download URL: python-xsense-0.0.10.tar.gz
- Upload date:
- Size: 11.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d824e6ee66f3e23a5e1eea3576562a58383458d2bd25f027a7c96bc7475e0cb
|
|
| MD5 |
977f8e6b138076690957669d952788bf
|
|
| BLAKE2b-256 |
9bdda58c01572bcc2095138bfa680165a66cbf7d8ea9822096c54f464e1b6eb8
|
File details
Details for the file python_xsense-0.0.10-py3-none-any.whl.
File metadata
- Download URL: python_xsense-0.0.10-py3-none-any.whl
- Upload date:
- Size: 14.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f0c53e2fab3a709671a3f167046c7a2e1f7ffb456844151c6b75c0f79088e9d
|
|
| MD5 |
cfa42b545350784ac5e0f3c9743abb77
|
|
| BLAKE2b-256 |
8c37f6117650fe685bb720eb3a7b92dc27d90c3efd0b9e026f958ee8b483b099
|