Skip to main content

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

PyPI - Version PyPI - Python Version


[!NOTE]
hamkit.uls is a small standalone component of hamkit. 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 with pip install hamkit.

[!TIP]
Even if you do not use ULS 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hamkit_uls-0.0.1a2.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

hamkit_uls-0.0.1a2-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

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

Hashes for hamkit_uls-0.0.1a2.tar.gz
Algorithm Hash digest
SHA256 7fc6fb7a416d4724d6b8757b4a84e60ca98a87e556a130d7e59f4ef63e17e221
MD5 76c75503bb24af61c3dbde3fbb53b0a1
BLAKE2b-256 6370dbbc7d434ddaf1b80d681a86c3ceee99679b2286e37609b129c411280f97

See more details on using hashes here.

File details

Details for the file hamkit_uls-0.0.1a2-py3-none-any.whl.

File metadata

File hashes

Hashes for hamkit_uls-0.0.1a2-py3-none-any.whl
Algorithm Hash digest
SHA256 fee6bc073a4492b537e9f462254bfbdbfff30da2a71c04c1fbbbdafa3f673ae6
MD5 545859803749f22cee0d478e9688de72
BLAKE2b-256 2348ca02e428d7a2658eb00a50925faff5e87455b38083c07edc6737ec4aadb5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page