A tool for working with local copies of the FCC Universal Licensing System (ULS) database dumps (e.g., to look up information about a US call sign.)
Project description
ITU Prefixes
[!NOTE]
hamkit.uls
is a small standalone component ofhamkit
. You can use it by itself (see below) if queries against the FCC ULS database is all that you need. Alternatively, install the entire collection of HamKit modules withpip install hamkit
.
[!TIP]
Even if you do not useULS
instances directly (e.g, if you want to run your own database queries),ULS.download()
is useful for downloading and parsing the data into sqlite.
A simple library to work with a local copy of the FCC ULS database
pip install hamkit-uls
Download the ULS data, and load it into a sqlite database
At present, the library is mainly only useful for downloading and parsing the FCC ULS database (from their weekly database dumps), loading it into a sqlite database, and retrieving information about call signs. Here is an example, showing these operations:
import os
import logging
from hamkit.uls import ULS
logging.basicConfig(level=logging.DEBUG)
# Download the database, if not already present
db_file = "uls.db"
if not os.path.isfile(db_file):
ULS.download("uls.db")
# Query information about a callsign
uls = ULS(db_file)
print(uls.call_sign_lookup("kk7cmt"))
which will output the following:
UlsRecord(service='AMAT', unique_id='12345678', uls_file_number='', call_sign='KK7CMT', entity_type='L', entity_name='Fourney, Adam', first_name='Adam', middle_initial='', last_name='Fourney', street_address='1234 Streetname ST', city='Cityname', state='WA', zip_code='12345', status_code='', status_date='', linked_call_sign='', operator_class='T', group_code='D', region_code='7')
In general, the operation is straightforward enough, but ULS.download()
has numerous options, as per the following docstring:
"""
Download the amateur and/or GMRS license data from the FCC, and load
it into a local sqlite database.
Parameters:
db_filename: The location of the sqlite database to create.
overwrite: If true, overwrite any existing file (Default: False)
amat_uri: The URI from where to download amateur radio license data.
Set to None to skip downloading amateur radio data.
(Default: ULS_AMAT_URI)
gmrs_uri: The URI from where to download GMRS license data.
Set to None to skip downloading GMRS data.
(Default: ULS_GMRS_URI)
"""
License
itu-prefixes
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
File details
Details for the file hamkit_uls-0.0.1a2.tar.gz
.
File metadata
- Download URL: hamkit_uls-0.0.1a2.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.26.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7fc6fb7a416d4724d6b8757b4a84e60ca98a87e556a130d7e59f4ef63e17e221 |
|
MD5 | 76c75503bb24af61c3dbde3fbb53b0a1 |
|
BLAKE2b-256 | 6370dbbc7d434ddaf1b80d681a86c3ceee99679b2286e37609b129c411280f97 |
File details
Details for the file hamkit_uls-0.0.1a2-py3-none-any.whl
.
File metadata
- Download URL: hamkit_uls-0.0.1a2-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.26.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fee6bc073a4492b537e9f462254bfbdbfff30da2a71c04c1fbbbdafa3f673ae6 |
|
MD5 | 545859803749f22cee0d478e9688de72 |
|
BLAKE2b-256 | 2348ca02e428d7a2658eb00a50925faff5e87455b38083c07edc6737ec4aadb5 |