xknx


Namexknx JSON
Version 3.3.0 PyPI version JSON
download
home_pageNone
SummaryAn Asynchronous Library for the KNX protocol. Documentation: https://xknx.io/
upload_time2024-10-20 17:57:40
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10.0
licenseMIT
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?url=https%3A%2F%2Fanalytics.home-assistant.io%2Fcurrent_data.json&query=%24.integrations.knx&logo=home-assistant&label=integration%20usage&color=41BDF5&cacheSeconds=21600)](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.10 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',
        )
        xknx.devices.async_add(light)

        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": null,
    "name": "xknx",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10.0",
    "maintainer_email": null,
    "keywords": "KNX, EIB, Home Assistant, home automation",
    "author": null,
    "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/c1/7f/c04fd83c8b3a42a26378976d194a605e63020392ce1f81393d56e8d26ef5/xknx-3.3.0.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?url=https%3A%2F%2Fanalytics.home-assistant.io%2Fcurrent_data.json&query=%24.integrations.knx&logo=home-assistant&label=integration%20usage&color=41BDF5&cacheSeconds=21600)](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.10 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(\n            xknx,\n            name='TestLight',\n            group_address_switch='1/0/9',\n        )\n        xknx.devices.async_add(light)\n\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",
    "summary": "An Asynchronous Library for the KNX protocol. Documentation: https://xknx.io/",
    "version": "3.3.0",
    "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": "4d1fbe5606f4d5e8cf1fd1eabfc38988640469fd4652d97a2185fd0852f092e9",
                "md5": "a199108de55f259167316440151533c4",
                "sha256": "d18ad7f2962c5bf3e9249eab11197898c1d050b07256f70f0ec4a8eaac812b0a"
            },
            "downloads": -1,
            "filename": "xknx-3.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a199108de55f259167316440151533c4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10.0",
            "size": 230869,
            "upload_time": "2024-10-20T17:57:38",
            "upload_time_iso_8601": "2024-10-20T17:57:38.473031Z",
            "url": "https://files.pythonhosted.org/packages/4d/1f/be5606f4d5e8cf1fd1eabfc38988640469fd4652d97a2185fd0852f092e9/xknx-3.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c17fc04fd83c8b3a42a26378976d194a605e63020392ce1f81393d56e8d26ef5",
                "md5": "1342a874d0dfabd57dcef9995a85831a",
                "sha256": "cfdfbb2871ad405aac64817b4b558cd920b22d2e251baaad5190d9ee8e3999b9"
            },
            "downloads": -1,
            "filename": "xknx-3.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "1342a874d0dfabd57dcef9995a85831a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10.0",
            "size": 154271,
            "upload_time": "2024-10-20T17:57:40",
            "upload_time_iso_8601": "2024-10-20T17:57:40.494236Z",
            "url": "https://files.pythonhosted.org/packages/c1/7f/c04fd83c8b3a42a26378976d194a605e63020392ce1f81393d56e8d26ef5/xknx-3.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-20 17:57:40",
    "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"
}
        
Elapsed time: 0.90199s