Python-xsense
=============
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.
Raw data
{
"_id": null,
"home_page": "https://github.com/theosnel/python-xsense",
"name": "python-xsense",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "python, xsense",
"author": "Theo Snelleman",
"author_email": "<python@theo.snelleman.net>",
"download_url": "https://files.pythonhosted.org/packages/c9/14/957cda92d8508e4944d9bfea1b6eeee927f294392dc00b3fe575a48fbf89/python-xsense-0.0.13.tar.gz",
"platform": null,
"description": "Python-xsense\n=============\n\nPython-xsense is a small library to interact with the API of XSense Home\nSecurity. It allows to retrieve the status of various devices and the\nbasestation.\n\nExample sync usage\n------------------\n\n::\n\n >>> from xsense import XSense\n >>> from xsense.utils import dump_environment\n >>> api = XSense()\n >>> api.init()\n >>> api.login(username, password)\n >>> api.load_all()\n >>> for _, h in api.houses.items():\n >>> for _, s in h.stations.items():\n >>> api.get_state(s)\n >>> dump_environment(api)\n\nExample async usage\n-------------------\n\n::\n\n >>> import asyncio\n >>> from xsense import AsyncXSense\n >>> from xsense.utils import dump_environment\n >>>\n >>> async def run(username: str, password: str):\n >>> api = AsyncXSense()\n >>> await api.init()\n >>> await api.login(username, password)\n >>> for _, h in api.houses.items():\n >>> for _, s in h.stations.items():\n >>> await api.get_state(s)\n >>> dump_environment(api)\n >>>\n >>> asyncio.run(run(username, password))\n\nDevelopment\n-----------\n\nThis library is in an early development stage and created primarily to\nmake an integration for home assistant.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "XSense Python Module",
"version": "0.0.13",
"project_urls": {
"Homepage": "https://github.com/theosnel/python-xsense"
},
"split_keywords": [
"python",
" xsense"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c6d7b683b83203667daa29a76984b485052621a9e33acb7430a3c72cfd2d8f52",
"md5": "4982661d67333a79bf87771869de1f4d",
"sha256": "f54efae77f64cfa2a57be9c57ec2cd8c25348d3da06f7216d7f414b4378d2afa"
},
"downloads": -1,
"filename": "python_xsense-0.0.13-py3-none-any.whl",
"has_sig": false,
"md5_digest": "4982661d67333a79bf87771869de1f4d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 16391,
"upload_time": "2024-10-16T18:41:04",
"upload_time_iso_8601": "2024-10-16T18:41:04.145923Z",
"url": "https://files.pythonhosted.org/packages/c6/d7/b683b83203667daa29a76984b485052621a9e33acb7430a3c72cfd2d8f52/python_xsense-0.0.13-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "c914957cda92d8508e4944d9bfea1b6eeee927f294392dc00b3fe575a48fbf89",
"md5": "30d106bf821a901c491977ca742b2254",
"sha256": "fae8533f2cc649ae37044b33b04b4f4a3d55ab2ee0882b8f226ac4eb7158f4e9"
},
"downloads": -1,
"filename": "python-xsense-0.0.13.tar.gz",
"has_sig": false,
"md5_digest": "30d106bf821a901c491977ca742b2254",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 13016,
"upload_time": "2024-10-16T18:41:05",
"upload_time_iso_8601": "2024-10-16T18:41:05.569707Z",
"url": "https://files.pythonhosted.org/packages/c9/14/957cda92d8508e4944d9bfea1b6eeee927f294392dc00b3fe575a48fbf89/python-xsense-0.0.13.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-16 18:41:05",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "theosnel",
"github_project": "python-xsense",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "python-xsense"
}