Package: aprs3
aprs3 is a module for encoding and decoding APRS data for use with AX.25 or APRS-IS.Supported Data TypesPosition (PositionReport)CompressedUncompressedw/ TimestampData ExtensionCourse / SpeedPHGRNGDFSAltitudeObject (ObjectReport)Item (ItemReport)Status (StatusReport)Message (Message)Unknown data types will be decoded asInformationField.InterfacesThis 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,
seekiss3.Versions8.x.x branch is a large rewrite including async functionality and full packet encoding.Previous versions were released byampledataasaprs: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.xInstallationInstall from pypi using pip:pip install aprs3Usage ExamplesExample 1: Library Usage - ReceiveThe 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 callbackp, which prints them.Example 1 Codeimport 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 OutputW2GMD-6>APRX28,TCPIP*,qAC,APRSFI-I1:T#471,7.5,34.7,37.0,1.0,137.0,00000000Example 2: Library Usage - SendThe following example connects to APRS-IS and sends an APRS frame.Example 2 Codeimport aprs

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

with aprs.TCP(user='W2GMD', passcode='12345') as a:
    a.write(frame)TestingRun pytest via tox:toxSee AlsoPython kiss3 ModuleLibrary for interfacing-to and encoding-for various KISS Interfaces.Forked fromampledata/kissPython APRS GatewayUses Redis PubSub to run a multi-interface APRS Gateway.Python APRS TrackerTK.dirusDirus is a daemon for managing a SDR to Dire Wolf interface. Manifests that interface as a KISS TCP port.Similar Projectsapexby Jeffrey Phillips Freeman (WI2ARD). Next-Gen APRS Protocol. (based on this Module! :)aprslibby Rossen Georgiev. A Python APRS Library with build-in parsers for several Frame types.aprxby Matti & Kenneth. A C-based Digi/IGate Software for POSIX platforms.dixprsby HA5DI. A Python APRS project with KISS, digipeater, et al., support.APRSDroidby GE0RG. A Java/Scala Android APRS App.YAACby KA2DDO. A Java APRS Client.Ham-APRS-FAPby aprs.fi: A Perl APRS Parser.Dire Wolfby WB2OSZ. A C-Based Soft-TNC for interfacing with sound cards. Can present as a KISS interface!SourceGithub:https://github.com/python-aprs/aprs3AuthorsGreg Albrecht W2GMDoss@undef.nethttp://ampledata.org/Masen Furer KF7HVMkf7hvm@0x26.netCopyrightCopyright 2022 Masen Furer and ContributorsCopyright 2017 Greg Albrecht and ContributorsAutomatic Packet Reporting System (APRS)is Copyright Bob Bruninga WB4APRwb4apr@amsat.orgdecimaldegrees.py - Copyright (C) 2006-2013 by Mateusz Łoskot <mateusz@loskot.net>LicenseApache License, Version 2.0. SeeLICENSEfor details.decimaldegrees.py- BSD 3-clause Licensebase91.py- GPL