From 65e5dfda35b05ab646f8fc2851eaf3801fc3da4c Mon Sep 17 00:00:00 2001 From: Michaela Date: Thu, 10 Jun 2021 19:51:20 +1000 Subject: [PATCH] bumpversion --- README.md | 9 +++++++++ pyproject.toml | 2 +- sondehub/__init__.py | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8aeff2b..be2648f 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,15 @@ while 1: ``` +Advanced Usage +-- +Manual usage of the Paho MQTT network loop can be obtained by using the `loop`, `loop_forever`, `loop_start` and `loop_stop` functions, taking care to ensure that the different types of network loop aren't mixed. See Paho documentation [here](https://www.eclipse.org/paho/index.php?page=clients/python/docs/index.php#network-loop). + +```python +test = sondehub.Stream(on_message=on_message, sondes=sondes, auto_start_loop=False) +test.loop_forever() +``` + ### CLI Usage #### Live streaming data ```sh diff --git a/pyproject.toml b/pyproject.toml index 9ff269c..2d2e966 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "sondehub" -version = "0.1.9" +version = "0.1.10" description = "SDK to access SondeHub open data" authors = ["Michaela "] readme = "README.md" diff --git a/sondehub/__init__.py b/sondehub/__init__.py index 2e201a1..e93dbbd 100644 --- a/sondehub/__init__.py +++ b/sondehub/__init__.py @@ -34,7 +34,7 @@ class Stream: self.loop_start = self.mqttc.loop_start self.loop_stop = self.mqttc.loop_stop - self.loop_step = self.mqttc.loop + self.loop = self.mqttc.loop self.loop_forever = self.mqttc.loop_forever def add_sonde(self, sonde):