Skip to content

python3-pyhamtools

Python library for callsign lookup, locators and DXCC data

What it does

A library, not a program. It resolves a callsign to its DXCC entity, CQ and ITU zone and continent using country files or online sources, converts between Maidenhead locators and coordinates, computes distance and bearing between two points, and looks up callsigns against QRZ, HamQTH and ClubLog.

Why you would want it

Every one of those is a small job that is easy to get subtly wrong -- DXCC entity resolution in particular is a table of exceptions, not a rule. If you are writing anything that touches callsigns, this is the difference between a script that works and a script that works except for the interesting prefixes.

Before it will work

Python 3. Online lookups need network access and, for QRZ, an account; offline entity resolution works from a country file with no network at all.

How it installs

  • apt: python3-pyhamtools

Known problems

Country files age. DXCC entities are added, deleted and redefined, and a stale cty.dat resolves a new prefix to the wrong entity silently -- the library reports an answer, not a doubt. Refresh the data rather than trusting a cached copy for award-critical work.

Keeping it current

  • probe: apt policy
  • strategy: apt_upgrade

Where to get help with the software itself

Tobias Wellnitz, DH1TW. GitHub issues at the URL above.

Source: catalog/packages/python3-pyhamtools.yaml