A Library with Amateur Radio specific Functions and Methods
Find a file
2015-04-14 02:11:25 +02:00
docs improved handling of expired QRZ.com session keys 2015-04-14 01:39:57 +02:00
pyhamtools raising KeyError when Callsign not found and the session key has just expired 2015-04-14 02:11:25 +02:00
test added qrz.com and callsign exception file 2015-04-06 20:00:30 +02:00
LICENSE Initial commit 2014-04-24 04:48:38 -07:00
README.md updated readme.md 2015-04-06 20:05:18 +02:00
readthedocs-pip-requirements.txt Added pyhamtools.qsl to load LOTW and EQSL user list 2014-10-11 23:39:01 +02:00
setup.py Added pyhamtools.qsl to load LOTW and EQSL user list 2014-10-11 23:39:01 +02:00
tox.ini added qrz.com and callsign exception file 2015-04-06 20:00:30 +02:00
tox_requirements.txt added qrz.com and callsign exception file 2015-04-06 20:00:30 +02:00

pyhamtools

Pyhamtools is a set of functions and classes for Amateur Radio purpose. Currently the core part is the Callsign Lookup which decodes any amateur radio callsign string and provides the corresponding information (Country, DXCC entity, CQ Zone...etc). This basic functionality is needed for Logbooks, DX-Clusters or Log Checking.

Currently,

are supported sources. All these lookup services can be accessed through a unified interface.

Other modules include location based calculations (e.g. distance, heading between Maidenhead locators) or frequency based calculations (e.g. frequency to band).

References

This Library is used in production at the DXHeat.com DX Cluster, performing several thousand lookups and calculations per day.

Documentation

Check out the full documentation at: PyHamTools.readthedocs.org

Installation

Easiest way to install pyhamtools is through the packet manager PIP:

pip install pyhamtools

Example: How to use pyhamtools


>>> from pyhamtools.locator import calculate_heading
>>> calculate_heading("JN48QM", "QF67bf")
74.3136


>>> from pyhamtools import LookupLib, Callinfo
>>> my_lookuplib = LookupLib(lookuptype="countryfile")
>>> cic = Callinfo(my_lookuplib)
>>> cic.get_all("DH1TW")
    {
        'country': 'Fed. Rep. of Germany',
        'adif': 230,
        'continent': 'EU',
        'latitude': 51.0,
        'longitude': -10.0,
        'cqz': 14,
        'ituz': 28
    }

Testing

An extensive set of unit tests has been created for all Classes & Methods.