You can often find us in the #highaltitude IRC Channel on Libera Chat.
## Installing
This library is available via pypi, and can be installed into your Python environment using:
```
pip install sondehub
```
## Submitting Telemetry to SondeHub-Amateur
A guide on using the SondeHub-Amateur uploader class is available here https://github.com/projecthorus/pysondehub/wiki/SondeHub-Amateur-Uploader-Class-Usage
The `on_message` callback will be passed a python dictonary using the [Universal Sonde Telemetry Format](https://github.com/projecthorus/radiosonde_auto_rx/wiki/SondeHub-DB-Universal-Telemetry-Format), or [Amateur Telemetry Format](https://github.com/projecthorus/sondehub-infra/wiki/%5BDRAFT%5D-Amateur-Balloon-Telemetry-Format)
Alternatively, you can add or remove serial numbers from the filter after the stream has started using the `.add_sonde("serial")` and `.remove_sonde("serial")` functions.
e.g.:
```
test.add_sonde("R3320848")
test.remove_sonde("R3320848")
```
### Amateur Launches
Amateur balloon launches can be received by subscribing to the `amateur` topic, using the `prefix` argument as follows:
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)
A basic interface to the Open Data is a available using `sondehub.download(serial=, datetime_prefix=)`. When using datetime_prefix only summary data is provided (the oldest, newest and highest frames)