{"id":13635367,"url":"https://github.com/dh1tw/pyhamtools","last_synced_at":"2026-01-10T15:34:59.914Z","repository":{"id":16356518,"uuid":"19106533","full_name":"dh1tw/pyhamtools","owner":"dh1tw","description":"A Library with Amateur Radio specific Functions and Methods","archived":false,"fork":false,"pushed_at":"2025-03-01T23:10:51.000Z","size":8548,"stargazers_count":94,"open_issues_count":3,"forks_count":25,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-04T07:17:30.983Z","etag":null,"topics":["amateur-radio","dx-cluster","ham-radio","hamradio","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dh1tw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-04-24T11:48:38.000Z","updated_at":"2025-03-01T23:10:55.000Z","dependencies_parsed_at":"2024-01-03T22:24:33.900Z","dependency_job_id":"8f8e9866-5f87-4427-9505-c09ecdf22183","html_url":"https://github.com/dh1tw/pyhamtools","commit_stats":{"total_commits":142,"total_committers":8,"mean_commits":17.75,"dds":0.04929577464788737,"last_synced_commit":"e549f416e8d004cc2c0e4a87d4f1a051c876f8cf"},"previous_names":[],"tags_count":34,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dh1tw%2Fpyhamtools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dh1tw%2Fpyhamtools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dh1tw%2Fpyhamtools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dh1tw%2Fpyhamtools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dh1tw","download_url":"https://codeload.github.com/dh1tw/pyhamtools/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249606272,"owners_count":21298851,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["amateur-radio","dx-cluster","ham-radio","hamradio","python"],"created_at":"2024-08-02T00:00:44.569Z","updated_at":"2026-01-10T15:34:59.848Z","avatar_url":"https://github.com/dh1tw.png","language":"Python","funding_links":[],"categories":["Software"],"sub_categories":["Libraries"],"readme":"# pyhamtools\n\n![Build Status](https://github.com/dh1tw/pyhamtools/actions/workflows/test.yml/badge.svg)\n[![codecov](https://codecov.io/gh/dh1tw/pyhamtools/branch/master/graph/badge.svg)](https://codecov.io/gh/dh1tw/pyhamtools)\n[![PyPI version](https://badge.fury.io/py/pyhamtools.svg)](https://badge.fury.io/py/pyhamtools)\n\nPyhamtools is a set of functions and classes for Amateur Radio purposes.\nCurrently, the core part is the Callsign Lookup which decodes any amateur radio\ncallsign string and provides the corresponding information (Country, DXCC\nentity, CQ Zone...etc). This basic functionality is needed for Logbooks,\nDX-Clusters or Log Checking. This and additional convenience features are\nprovided for the following sources:\n\nCurrently,\n* [AD1C's Amateur Radio Country Files](https://www.country-files.com)\n* [Clublog Prefixes \u0026 Exceptions XML File](https://clublog.freshdesk.com/support/articles/54902-downloading-the-prefixes-and-exceptions-as)\n* [Clublog DXCC Query API](http://clublog.freshdesk.com/support/articles/54904-how-to-query-club-log-for-dxcc)\n* [QRZ.com XML API](http://www.qrz.com/XML/current_spec.html)\n* [Redis.io](http://redis.io)\n* [ARRL Logbook of the World (LOTW)](https://lotw.arrl.org)\n* [eQSL.cc user list](https://www.eqsl.cc)\n* [Clublog \u0026 OQRS user list](http://clublog.freshdesk.com/support/solutions/articles/3000064883-list-of-club-log-and-lotw-users)\n\nOther modules include location-based calculations (e.g. distance,\nheading between Maidenhead locators) or frequency-based calculations\n(e.g. frequency to band).\n\n## References\n\nThis Library is used in production at the [DXHeat.com DX Cluster](https://dxheat.com), performing several thousand lookups and calculations per day.\n\n## Compatibility\n\nPyhamtools is compatible with Python \u003e=3.6.\nWe check compatibility on OSX, Windows, and Linux with the following Python versions:\n\n* Python 3.6 (will be deprecated in 2025)\n* Python 3.7 (will be deprecated in 2025)\n* Python 3.8\n* Python 3.9\n* Python 3.10\n* Python 3.11\n* Python 3.12\n* Python 3.13\n* [pypy3.8](https://pypy.org/)\n* [pypy3.9](https://pypy.org/)\n* [pypy3.10](https://pypy.org/)\n\nThe support for Python 2.7 and 3.5 has been deprecated at the end of 2023. The last version which supports Python 2.7 and Python 3.5 is 0.8.7.\n\n## Documentation\n\nCheck out the full documentation including the changelog at:\n[pyhamtools.readthedocs.org](http://pyhamtools.readthedocs.org/en/latest/index.html)\n\n## License\n\nPyhamtools is published under the permissive [MIT License](http://choosealicense.com/licenses/mit/). You can find a good comparison of\nOpen Source Software licenses, including the MIT license at [choosealicense.com](http://choosealicense.com/licenses/)\n\n## Dependencies\n\nStarting with version 0.8.0, `libxml2-dev` and `libxslt-dev` are required dependencies.\n\nThere is a good change that the libraries are already installed on your system. If not, you can install them with the package manager of your distro. For example on Debian / Ubuntu based distros the corresponding command is:\n\n```bash\n\n$ sudo apt-get install libxml2-dev libxslt-dev\n\n```\n\nYou don't need to install these libraries manually on Windows / MacOS.\n\n\n## Installation\n\n\nThe easiest way to install pyhamtools is through the packet manager `pip`:\n\n```bash\n\n$ pip install pyhamtools\n\n```\n\nChristoph, [@df7cb](https://github.com/df7cb) is kindly maintaining a Debian package as an alternative way to install pyhamtools:\n\n```bash\n\n$ sudo apt-get install pyhamtools\n\n```\n\n## Example: How to use pyhamtools\n\n``` python\n\n\u003e\u003e\u003e from pyhamtools.locator import calculate_heading\n\u003e\u003e\u003e calculate_heading(\"JN48QM\", \"QF67bf\")\n74.3136\n\n\n\u003e\u003e\u003e from pyhamtools import LookupLib, Callinfo\n\u003e\u003e\u003e my_lookuplib = LookupLib(lookuptype=\"countryfile\")\n\u003e\u003e\u003e cic = Callinfo(my_lookuplib)\n\u003e\u003e\u003e cic.get_all(\"DH1TW\")\n    {\n        'country': 'Fed. Rep. of Germany',\n        'adif': 230,\n        'continent': 'EU',\n        'latitude': 51.0,\n        'longitude': 10.0,\n        'cqz': 14,\n        'ituz': 28\n    }\n\n```\n\n## Testing\n\nAn extensive set of unit tests has been created for all Classes \u0026 Methods.\nTo be able to perform all tests, you need a QRZ.com account and a\n[Clublog API key](http://clublog.freshdesk.com/support/solutions/articles/54910-api-keys).\n\npyhamtools rely on the [pytest](https://docs.pytest.org/en/latest/) testing\nframework. To install it with all the needed dependencies run:\n\n```bash\n\n$ pip install -r requirements-pytest.txt\n\n```\n\nThe QRZ.com credentials and the Clublog API key have to be set in the environment\nvariables:\n\n```bash\n\n$ export CLUBLOG_APIKEY=\"\u003cyour API key\u003e\"\n$ export QRZ_USERNAME=\"\u003cyour qrz.com username\u003e\"\n$ export QRZ_PWD=\"\u003cyour qrz.com password\u003e\"\n\n```\n\nTo perform the tests related to the [redis](https://redis.io/) key/value\nstore, a Redis server has to be up \u0026 running.\n\n```bash\n\n$ sudo apt install redis-server\n$ redis-server\n\n```\n\nTo run the tests, simply execute:\n\n```bash\n\n$ pytest --cov pyhamtools\n\n```\n\n## Generate the documentation\n\nYou can generate the documentation of pyhamtools with the following commands:\n\n```bash\n\n$ pip install -r requirements-docs.txt\n$ cd docs\n$ make html\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdh1tw%2Fpyhamtools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdh1tw%2Fpyhamtools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdh1tw%2Fpyhamtools/lists"}