Name | xknx JSON |
Version |
2.12.1
JSON |
| download |
home_page | |
Summary | An Asynchronous Library for the KNX protocol. Documentation: https://xknx.io/ |
upload_time | 2024-02-26 08:25:15 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.9.0 |
license | MIT License |
keywords |
knx
eib
home assistant
home automation
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
|
# XKNX - An asynchronous KNX library written in Python
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/xknx?logo=python)
[![codecov](https://codecov.io/gh/XKNX/xknx/branch/main/graph/badge.svg?token=irWbIygS84)](https://codecov.io/gh/XKNX/xknx)
[![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)
[![Pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=f8b424)](https://github.com/pre-commit/pre-commit)
[![HA integration usage](https://img.shields.io/badge/dynamic/json?color=41BDF5&logo=home-assistant&label=integration%20usage&suffix=%20installs&cacheSeconds=15600&url=https://analytics.home-assistant.io/data.json&query=current.integrations.knx)](https://www.home-assistant.io/integrations/knx/)
[![Discord](https://img.shields.io/discord/338619021215924227?color=7289da&label=Discord&logo=discord&logoColor=7289da)](https://discord.gg/bkZe9m4zvw)
## Documentation
See documentation at: [https://xknx.io/](https://xknx.io/)
## Help
We need your help for testing and improving XKNX. For questions, feature requests, bug reports either open an [issue](https://github.com/XKNX/xknx/issues), join the [XKNX chat on Discord](https://discord.gg/EuAQDXU) or write an [email](mailto:xknx@xknx.io).
## Development
You will need at least Python 3.9 in order to use XKNX.
Setting up your local environment:
1. Install requirements: `pip install -r requirements/testing.txt`
2. Install pre-commit hook: `pre-commit install`
## Testing
To run all tests, linters, formatters and type checker call `tox`
Running only unit tests is possible with `pytest`
Running specific unit tests can be invoked by: `pytest -vv test/management_tests/procedures_test.py -k test_nm_individual_address_serial_number_write_fail`
## Home-Assistant
XKNX is the underlying library for the KNX integration in [Home Assistant](https://home-assistant.io/).
## Example
```python
"""Example for switching a light on and off."""
import asyncio
from xknx import XKNX
from xknx.devices import Light
async def main():
"""Connect to KNX/IP bus, switch on light, wait 2 seconds and switch it off again."""
async with XKNX() as xknx:
light = Light(xknx,
name='TestLight',
group_address_switch='1/0/9')
await light.set_on()
await asyncio.sleep(2)
await light.set_off()
asyncio.run(main())
```
## Attributions
Many thanks to [Weinzierl Engineering GmbH](https://weinzierl.de) and [MDT technologies GmbH](https://www.mdt.de) for providing us each an IP Secure Router to support testing and development of xknx.
Raw data
{
"_id": null,
"home_page": "",
"name": "xknx",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.9.0",
"maintainer_email": "",
"keywords": "KNX,EIB,Home Assistant,home automation",
"author": "",
"author_email": "Julius Mittenzwei <julius@mittenzwei.com>, Matthias Alphart <farmio@alphart.net>, Marvin Wichmann <me@marvin-wichmann.de>",
"download_url": "https://files.pythonhosted.org/packages/ce/d8/356ef167e3b07486c265f3fc224c48ad2b8e2dc2851665e3e737632b7f49/xknx-2.12.1.tar.gz",
"platform": null,
"description": "# XKNX - An asynchronous KNX library written in Python\n\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/xknx?logo=python)\n[![codecov](https://codecov.io/gh/XKNX/xknx/branch/main/graph/badge.svg?token=irWbIygS84)](https://codecov.io/gh/XKNX/xknx)\n[![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)\n[![Pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=f8b424)](https://github.com/pre-commit/pre-commit)\n[![HA integration usage](https://img.shields.io/badge/dynamic/json?color=41BDF5&logo=home-assistant&label=integration%20usage&suffix=%20installs&cacheSeconds=15600&url=https://analytics.home-assistant.io/data.json&query=current.integrations.knx)](https://www.home-assistant.io/integrations/knx/)\n[![Discord](https://img.shields.io/discord/338619021215924227?color=7289da&label=Discord&logo=discord&logoColor=7289da)](https://discord.gg/bkZe9m4zvw)\n\n## Documentation\n\nSee documentation at: [https://xknx.io/](https://xknx.io/)\n\n## Help\n\nWe need your help for testing and improving XKNX. For questions, feature requests, bug reports either open an [issue](https://github.com/XKNX/xknx/issues), join the [XKNX chat on Discord](https://discord.gg/EuAQDXU) or write an [email](mailto:xknx@xknx.io).\n\n## Development\n\nYou will need at least Python 3.9 in order to use XKNX.\n\nSetting up your local environment:\n\n1. Install requirements: `pip install -r requirements/testing.txt`\n2. Install pre-commit hook: `pre-commit install`\n\n## Testing\n\nTo run all tests, linters, formatters and type checker call `tox`\n\nRunning only unit tests is possible with `pytest`\nRunning specific unit tests can be invoked by: `pytest -vv test/management_tests/procedures_test.py -k test_nm_individual_address_serial_number_write_fail`\n\n## Home-Assistant\n\nXKNX is the underlying library for the KNX integration in [Home Assistant](https://home-assistant.io/).\n\n## Example\n\n```python\n\"\"\"Example for switching a light on and off.\"\"\"\nimport asyncio\n\nfrom xknx import XKNX\nfrom xknx.devices import Light\n\n\nasync def main():\n \"\"\"Connect to KNX/IP bus, switch on light, wait 2 seconds and switch it off again.\"\"\"\n async with XKNX() as xknx:\n light = Light(xknx,\n name='TestLight',\n group_address_switch='1/0/9')\n await light.set_on()\n await asyncio.sleep(2)\n await light.set_off()\n\nasyncio.run(main())\n```\n\n## Attributions\n\nMany thanks to [Weinzierl Engineering GmbH](https://weinzierl.de) and [MDT technologies GmbH](https://www.mdt.de) for providing us each an IP Secure Router to support testing and development of xknx.\n",
"bugtrack_url": null,
"license": "MIT License",
"summary": "An Asynchronous Library for the KNX protocol. Documentation: https://xknx.io/",
"version": "2.12.1",
"project_urls": {
"homepage": "https://xknx.io/",
"repository": "https://github.com/XKNX/xknx.git"
},
"split_keywords": [
"knx",
"eib",
"home assistant",
"home automation"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "869af046ba57293fd55a9a2258a1355e340a5ecf3972523739cbd2c097376b80",
"md5": "b8f87be4d7201e1ebc4bb78981641ddf",
"sha256": "696de56ea0bfcb0af6c04be12f31f3b415a9646ed48ca9b1c1f7c2ca0ad2e218"
},
"downloads": -1,
"filename": "xknx-2.12.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b8f87be4d7201e1ebc4bb78981641ddf",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9.0",
"size": 223471,
"upload_time": "2024-02-26T08:25:12",
"upload_time_iso_8601": "2024-02-26T08:25:12.558228Z",
"url": "https://files.pythonhosted.org/packages/86/9a/f046ba57293fd55a9a2258a1355e340a5ecf3972523739cbd2c097376b80/xknx-2.12.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ced8356ef167e3b07486c265f3fc224c48ad2b8e2dc2851665e3e737632b7f49",
"md5": "e63314e5c2459e3ead2cae0ed994c396",
"sha256": "c62721cc8520a1eeae13efdb02b0128ff679b88ffed951a7760364c3e902e165"
},
"downloads": -1,
"filename": "xknx-2.12.1.tar.gz",
"has_sig": false,
"md5_digest": "e63314e5c2459e3ead2cae0ed994c396",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9.0",
"size": 147759,
"upload_time": "2024-02-26T08:25:15",
"upload_time_iso_8601": "2024-02-26T08:25:15.335493Z",
"url": "https://files.pythonhosted.org/packages/ce/d8/356ef167e3b07486c265f3fc224c48ad2b8e2dc2851665e3e737632b7f49/xknx-2.12.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-26 08:25:15",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "XKNX",
"github_project": "xknx",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"tox": true,
"lcname": "xknx"
}