API Reference

Warning

This library is now deprecated. Use callsignlookuptools instead.

qrztools allows for both synchronous and asynchronous usage via two main classes, qrztools.QrzSync and qrztools.QrzAsync. These inherit from qrztools.QrzAbc. See there for some properties.

class qrztools.QrzAbc(username, password, session_key='', useragent='python-qrztools-v1.2.0')

The base class for QrzSync and QrzAsync. This should not be used directly.

property username
Getter

gets QRZ username

Return type

str

Setter

sets QRZ username

Type

str

property password
Getter

gets QRZ password

Return type

str

Setter

sets QRZ password

Type

str

property useragent
Getter

gets QRZ useragent

Return type

str

Setter

sets QRZ useragent

Type

str

property session_key
Getter

gets QRZ session key

Return type

str

Setter

sets QRZ session key

Type

str

Synchronous

class qrztools.QrzSync(username, password, session_key='', useragent='python-qrztools-v1.2.0', session=<requests.sessions.Session object>)

The synchronous QRZ API object

Parameters
  • username (str) – QRZ username

  • password (str) – QRZ password

  • session_key (str) – QRZ login session key

  • useragent (str) – Useragent for QRZ

  • session (requests.Session) – A requests session to use for requests

property session
Getter

gets the requests session

Return type

requests.Session

Setter

sets the requests session

Type

requests.Session

get_callsign(callsign)

Gets QRZ data for a callsign.

Parameters

callsign (str) – the callsign to search for

Returns

the QRZ data for the callsign

Return type

QrzCallsignData

get_bio(callsign)

Get the HTML for the bio of a callsign

Parameters

callsign (str) – the callsign to search for

Returns

the bio HTML

Return type

str

get_dxcc(query)

Get data about a DXCC entity from a DXCC entity number or callsign.

Parameters

query (Union[str, int]) – a DXCC entity number or callsign

Returns

the data about the DXCC entity

Return type

QrzDxccData

Asynchronous

class qrztools.QrzAsync(username, password, session_key='', useragent='python-qrztools-v1.2.0', session=None)

The asynchronous QRZ API object

Parameters
  • username (str) – QRZ username

  • password (str) – QRZ password

  • session_key (str) – QRZ login session key

  • useragent (str) – Useragent for QRZ

  • session (Optional[aiohttp.ClientSession]) – An aiohttp session to use for requests

property session
Getter

gets the aiohttp session

Return type

aiohttp.ClientSession

Setter

sets the aiohttp session

Type

aiohttp.ClientSession

async get_callsign(callsign)

Gets QRZ data for a callsign.

Parameters

callsign (str) – the callsign to search for

Returns

the QRZ data for the callsign

Return type

QrzCallsignData

async get_bio(callsign)

Get the HTML for the bio of a callsign

Parameters

callsign (str) – the callsign to search for

Returns

the bio HTML

Return type

str

async get_dxcc(query)

Get data about a DXCC entity from a DXCC entity number or callsign.

Parameters

query (Union[str, int]) – a DXCC entity number or callsign

Returns

the data about the DXCC entity

Return type

QrzDxccData