Skip to main content

Asynchronous APRS OGN (Open Glider Network) Client for asyncio and Python.

Project description

Introduction

Asynchronous OGN (Open Glider Network) Client for asyncio and Python that receives the planes', gliders', receivers', etc. APRS messages.

Asynchronicity allows a single listener script to execute concurrently other useful tasks like inserting records into a database, computing aggregate statistics, making web requests, etc., since there is no blocking function (e.g. listen() or run_forever()) and no callbacks.

To interpret the raw OGN messages, use a function like python-ogn-client's ogn.parser.parse.

Installation

pip install aogn

Usage

Basic example:

import asyncio

from aogn import Client


async def example() -> None:
    conn = Client(aprs_user='NO-CALL')
    while True:
        # Get the APRS packet once available:
        raw_message = await conn.packet()
        print(raw_message)

    await conn.disconnect()


if __name__ == '__main__':
    asyncio.run(example())

Please see example_with_ogn_client.py for a concurrent example.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aogn-0.1.2.tar.gz (15.4 kB view hashes)

Uploaded Source

Built Distribution

aogn-0.1.2-py3-none-any.whl (15.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page