Skip to main content

SondeHub (and SondeHub-Amateur) Python Library

This repository contains:

  • A uploader class for submitting high-altitude balloon telemetry data to SondeHub-Amateur
  • A simple realtime streaming SDK for the sondehub.org V2 API (both radiosondes, and amateur balloons).

Contacts

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

Streaming Telemetry from Sondehub or Sondehub-Amateur

To obtain live telemetry from Sondehub, the sondehub class can be used as follows:

import sondehub

def on_message(message):
    print(message)

test = sondehub.Stream(on_message=on_message)
while 1:
    pass

The on_message callback will be passed a python dictonary using the Universal Sonde Telemetry Format, or Amateur Telemetry Format

Filtering

To specify a particular serial number, or multiple serial numbers to subscribe to, you can pass these in as a list in the sondes argument:

import sondehub

def on_message(message):
    print(message)

test = sondehub.Stream(on_message=on_message, sondes=["R3320848"])
while 1:
    pass

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:

import sondehub

def on_message(message):
    print(message)

test = sondehub.Stream(on_message=on_message, prefix="amateur")

while 1:
    pass

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.

test = sondehub.Stream(on_message=on_message, sondes=sondes, auto_start_loop=False)
test.loop_forever()

CLI Usage

Live streaming data

# all radiosondes
sondehub
# single radiosonde
sondehub --serial "IMET-73217972"
# multiple radiosondes
sondehub --serial "IMET-73217972" --serial "IMET-73217973"
#pipe in jq
sondehub | jq .
{
  "subtype": "SondehubV1",
  "temp": "-4.0",
  "manufacturer": "SondehubV1",
  "serial": "IMET54-55067143",
  "lat": "-25.95437",
  "frame": "85436",
  "datetime": "2021-02-01T23:43:57.043655Z",
  "software_name": "SondehubV1",
  "humidity": "97.8",
  "alt": "5839",
  "vel_h": "-9999.0",
  "uploader_callsign": "ZS6TVB",
  "lon": "28.19082",
  "software_version": "SondehubV1",
  "type": "SondehubV1",
  "time_received": "2021-02-01T23:43:57.043655Z",
  "position": "-25.95437,28.19082"
}
....

For amateur radiosondes, just append the --amateur argument. e.g.:

sondehub --amateur

Downloading Archived Radiosonde Telemetry Data

Archived radiosonde telemetry data (Meteorological Radiosondes only) can be downloaded from our S3 bucket using:

sondehub --download S2810113

Open Data Access

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)

import sondehub
frames = sondehub.download(datetime_prefix="2018/10/01")
frames = sondehub.download(serial="serial")

Data license

Data is provided under the Creative Commons BY-SA 2.0 license.

Metadata

Release files for sondehub 0.3.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sondehub 0.3.3
File Size Uploaded Provenance Actions
sondehub-0.3.3.tar.gz 23.6 kB Without provenance Details for sondehub-0.3.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sondehub 0.3.3
File Interpreter ABI Platform Actions
sondehub-0.3.3-py3-none-any.whl Python 3 none any Details for sondehub-0.3.3-py3-none-any.whl

Total release size: 47.6 kB

Release files / sondehub-0.3.3.tar.gz

Download URL sondehub-0.3.3.tar.gz
Size 23.6 kB
Tags Source
SHA-256 checksum
How to use checksums
d75107c49d7af9aec9e084dbbd5ec553c3571045710a2bc8c262db45e3913242
BLAKE2b-256 checksum
How to use checksums
90d3434e6f0a8daf2776eaae45f4ba34015fe3db5477c9f4d08c633f7148e70f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.5.1 CPython/3.13.11 Darwin/25.2.0

Release files / sondehub-0.3.3-py3-none-any.whl

Download URL sondehub-0.3.3-py3-none-any.whl
Size 24.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6bdbd5ba845ebe71e14863eb522f9e08638f90faa1d62b230b0bf70853f3df7f
BLAKE2b-256 checksum
How to use checksums
c83695377ad4018030de22440ea2c351ad53d3ba7407ee6efc4062677615f22d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.5.1 CPython/3.13.11 Darwin/25.2.0

Security for sondehub 0.3.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page