A tool for working with ITU call sign prefixes (e.g., to determine which country likely issued a given call sign).
Project description
hamkit.itu
[!NOTE]
hamkit.ituis a small standalone component ofhamkit. You can use it by itself (see below) if ITU prefix functionality is all that you need. Alternatively, install the entire collection of HamKit modules withpip install hamkit.
A simple library to work with ITU call sign prefixes
pip install hamkit-itu
call_sign_to_country
To determine which country likely issued a call sign, you can do:
from hamkit.itu import call_sign_to_country
print(call_sign_to_country("KK7CMT"))
which will output:
ITU_Prefix(prefix='K', country_name='United States', country_code='US')
country_to_prefixes
Likewise, to determine which prefixes a country may use, you can do:
from hamkit.itu import country_to_prefixes
print(country_to_prefixes("US"))
which will output:
[
ITU_Prefix(prefix='AA', country_name='United States', country_code='US'),
ITU_Prefix(prefix='AB', country_name='United States', country_code='US'),
ITU_Prefix(prefix='AC', country_name='United States', country_code='US'),
ITU_Prefix(prefix='AD', country_name='United States', country_code='US'),
ITU_Prefix(prefix='AE', country_name='United States', country_code='US'),
ITU_Prefix(prefix='AF', country_name='United States', country_code='US'),
ITU_Prefix(prefix='AG', country_name='United States', country_code='US'),
ITU_Prefix(prefix='AH', country_name='United States', country_code='US'),
ITU_Prefix(prefix='AI', country_name='United States', country_code='US'),
ITU_Prefix(prefix='AJ', country_name='United States', country_code='US'),
ITU_Prefix(prefix='AK', country_name='United States', country_code='US'),
ITU_Prefix(prefix='AL', country_name='United States', country_code='US'),
ITU_Prefix(prefix='K', country_name='United States', country_code='US'),
ITU_Prefix(prefix='N', country_name='United States', country_code='US'),
ITU_Prefix(prefix='W', country_name='United States', country_code='US')
]
prefix_to_countries
Likewise, to determine which countries might correspond to a given prefix, do:
from hamkit.itu import prefix_to_countries
print(prefix_to_countries("HB"))
which will produce:
[
ITU_Prefix(prefix='HB3Y', country_name='Liechtenstein', country_code='LI'),
ITU_Prefix(prefix='HB0', country_name='Liechtenstein', country_code='LI'),
ITU_Prefix(prefix='HBL', country_name='Liechtenstein', country_code='LI'),
ITU_Prefix(prefix='HB', country_name='Switzerland', country_code='CH')
]
License
hamkit-itu is distributed under the terms of the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hamkit_itu-0.0.1a1.tar.gz.
File metadata
- Download URL: hamkit_itu-0.0.1a1.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.26.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f8399c36cf8b549a8053145ee6ffe19a31e653ae8dbf76a1c96ad7042c9c6cac
|
|
| MD5 |
aa4b339c2df47b01b4a581a093d7a08d
|
|
| BLAKE2b-256 |
f3ed0b4c7938eb45188ff56182689b7a65b814648160c9ec0f98c420d4cd10e0
|
File details
Details for the file hamkit_itu-0.0.1a1-py3-none-any.whl.
File metadata
- Download URL: hamkit_itu-0.0.1a1-py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.26.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b09a67b24f83c307efdffe5f31838875309c2f75cff212e07d42c6f8d41243a0
|
|
| MD5 |
7cc24461905c72b135f5839a77a63760
|
|
| BLAKE2b-256 |
d093ecdd8b4c15ac2c68248268a5c039c92b9c7223c5684b8815b9f81a274af1
|