Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

aprs3 - Python APRS Module

https://github.com/python-aprs/aprs3/actions/workflows/pytest.yml/badge.svg

aprs3 is a module for encoding and decoding APRS data for use with AX.25 or APRS-IS.

Supported Data Types

  • Position (PositionReport)

    • Compressed

    • Uncompressed

    • w/ Timestamp

    • Data Extension

      • Course / Speed

      • PHG

      • RNG

      • DFS

    • Altitude

  • Object (ObjectReport)

  • Item (ItemReport)

  • Status (StatusReport)

  • Message (Message)

Unknown data types will be decoded as InformationField.

Interfaces

This package supplies async methods for interacting with APRS-IS:

import asyncio
from aprs import create_aprsis_connection

async def main():
    transport, protocol = create_aprsis_connection(
        host="noam.aprs2.net",
        port=14580,
        user="KF7HVM",
        passcode="-1",  # use a real passcode for TX
        command='filter r/46.1/-122.9/500',
    )

    async for frame in protocol.read():
        print(frame)

if __name__ == "__main__":
    asyncio.run(main())

Synchronous wrappers are also included where that may be more convenient:

from pprint import pformat

import attrs

import aprs

with aprs.TCP(
    host="noam.aprs2.net",
    port=14580,
    user="KF7HVM",
    passcode="-1",  # use a real passcode for TX
    command='filter r/46.1/-122.9/500',
) as aprs_tcp:
    # block until 1 frame is available and print repr
    print(repr(aprs_tcp.read(
        callback=lambda f: print(f),
        min_frames=1,
    )[0]))

    # block until 3 frames are available and print decoded form
    for frame in aprs_tcp.read(min_frames=3):
        print(pformat(attrs.asdict(frame)))

Additionally, this package may be used with real TNCs via Serial KISS or KISS-over-TCP.

  • serial:

    • sync: aprs_serial = aprs.SerialKISS("/dev/ttyUSB0", 9600)

    • async: transport, protocol = aprs.create_serial_connection("/dev/ttyUSB0", 9600)

  • tcp:

    • sync: aprs_kiss_tcp = aprs.TCPKISS("localhost", 8001)

    • async: transport, protocol = aprs.create_tcp_connection("localhost", 8001)

These objects are used in the same way as the sample shown above.

For versions of the KISS transports which do NOT automatically encode/decode APRS data, see kiss3.

Versions

  • 8.x.x branch is a large rewrite including async functionality and full packet encoding.

Previous versions were released by ampledata as aprs:

  • 7.x.x branch and-on will be Python 3.x ONLY.

  • 6.5.x branch will be the last version of this Module that supports Python 2.7.x

Installation

Install from pypi using pip: pip install aprs3

Usage Examples

Example 1: Library Usage - Receive

The following example connects to APRS-IS and filters for APRS frames within 500 miles of 46.1N, 122.9W. Any frames returned are sent to the callback p, which prints them.

Example 1 Code

import aprs

def p(x): print(x)

with aprs.TCP(command='filter r/46.1/-122.9/500') as aprs_tcp:
    # callback can be passed to read()
    aprs_tcp.read(callback=p)

Example 1 Output

W2GMD-6>APRX28,TCPIP*,qAC,APRSFI-I1:T#471,7.5,34.7,37.0,1.0,137.0,00000000

Example 2: Library Usage - Send

The following example connects to APRS-IS and sends an APRS frame.

Example 2 Code

import aprs

frame = aprs.APRSFrame.from_str('KF7HVM-2>APRS:>Test from aprs!')

with aprs.TCP(user='W2GMD', passcode='12345') as a:
    a.write(frame)

Testing

Run pytest via tox:

tox

See Also

Similar Projects

  • apex by Jeffrey Phillips Freeman (WI2ARD). Next-Gen APRS Protocol. (based on this Module! :)

  • aprslib by Rossen Georgiev. A Python APRS Library with build-in parsers for several Frame types.

  • aprx by Matti & Kenneth. A C-based Digi/IGate Software for POSIX platforms.

  • dixprs by HA5DI. A Python APRS project with KISS, digipeater, et al., support.

  • APRSDroid by GE0RG. A Java/Scala Android APRS App.

  • YAAC by KA2DDO. A Java APRS Client.

  • Ham-APRS-FAP by aprs.fi: A Perl APRS Parser.

  • Dire Wolf by WB2OSZ. A C-Based Soft-TNC for interfacing with sound cards. Can present as a KISS interface!

Source

Github: https://github.com/python-aprs/aprs3

Authors

Greg Albrecht W2GMD oss@undef.net

http://ampledata.org/

Masen Furer KF7HVM kf7hvm@0x26.net

License

Apache License, Version 2.0. See LICENSE for details.

decimaldegrees.py - BSD 3-clause License

base91.py - GPL

Metadata

Release files for aprs3 8.1.0a0

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

Source distribution (sdist)

Source distribution for aprs3 8.1.0a0
File Size Uploaded Provenance Actions
aprs3-8.1.0a0.tar.gz 849.6 kB Without provenance Details for aprs3-8.1.0a0.tar.gz

Built distribution (wheel)

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

Total release size: 871.1 kB

Release files / aprs3-8.1.0a0.tar.gz

Download URL aprs3-8.1.0a0.tar.gz
Size 849.6 kB
Tags Source
SHA-256 checksum
How to use checksums
cc65a1cb5454c4533f0de6a77b22641422f7bcacbece3799635141aca83fddbe
BLAKE2b-256 checksum
How to use checksums
b169d2ed211aad64bcd9e92fc69e19fcb444aa1d71c62782ee082122b1a3d6b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / aprs3-8.1.0a0-py3-none-any.whl

Download URL aprs3-8.1.0a0-py3-none-any.whl
Size 21.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e87eb5ee33ef57fd6a9d5325c44307e46091fb3631b2c786397ff2b053606abc
BLAKE2b-256 checksum
How to use checksums
19c5a32160feee40a02e811dceb3eb8936c1b1a4c3139c93214f84b1d847a594
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for aprs3 8.1.0a0

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