From 73bb96467076f9e6fa747858bf3a54b23bddea7b Mon Sep 17 00:00:00 2001 From: Guido Schmitz Date: Wed, 2 Dec 2020 09:28:18 +0100 Subject: [PATCH] Update README and CHANGELOG --- README.md | 22 +++++++++++++++++++++- devolo_plc_api/__init__.py | 2 +- docs/CHANGELOG.md | 4 +++- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 99c7472..bbf9f20 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,27 @@ pytest ## Usage -All features we currently support are shown in our examples. If you want to use the package asynchronously, please check [example_async.py](https://github.com/2Fake/devolo_plc_api/blob/master/example_async.py). If you want to use it synchronously, please check [example_sync.py](https://github.com/2Fake/devolo_plc_api/blob/master/example_sync.py). +All features we currently support on device basis are shown in our examples. If you want to use the package asynchronously, please check [example_async.py](https://github.com/2Fake/devolo_plc_api/blob/master/example_async.py). If you want to use it synchronously, please check [example_sync.py](https://github.com/2Fake/devolo_plc_api/blob/master/example_sync.py). + +If you don't know the IP addresses of your devices, you can discover them. You will get a dictionary with the device's serial number as key. The connections to the devices will be already established, but you will have to take about disconnecting. + +```python +from devolo_plc_api.network import async_discover_network + +devices = await async_discover_network() +# Do your magic +await asyncio.gather(*[device.async_disconnect() for device in devices.values()]) +``` + +Or in a synchronious setup: + +```python +from devolo_plc_api.network import discover_network + +devices = discover_network() +# Do your magic +[device.disconnect() for device in devices.values()] +``` ## Supported device diff --git a/devolo_plc_api/__init__.py b/devolo_plc_api/__init__.py index d3ec452..493f741 100644 --- a/devolo_plc_api/__init__.py +++ b/devolo_plc_api/__init__.py @@ -1 +1 @@ -__version__ = "0.2.0" +__version__ = "0.3.0" diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 82361da..d094d6b 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -4,11 +4,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [unreleased] +## [v0.3.0] - 02.12.2020 ### Added - If API data is discovered externally, it can be reused +- The devices can be accessed without context manager +- If the network topology is unknown, it can be discovered now ### Changed