Metadata-Version: 2.4
Name: qrzlib
Version: 2.0.5
Summary: API to access data from qrz.com.
Author: Fred C. (W6BSD)
License: BSD 3-Clause License
        
        Copyright (c) 2023, Fred Cirera
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are met:
        
        1. Redistributions of source code must retain the above copyright notice, this
           list of conditions and the following disclaimer.
        
        2. Redistributions in binary form must reproduce the above copyright notice,
           this list of conditions and the following disclaimer in the documentation
           and/or other materials provided with the distribution.
        
        3. Neither the name of the copyright holder nor the names of its
           contributors may be used to endorse or promote products derived from
           this software without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
        AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
        DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
        FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
        CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
        OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
        
Project-URL: Source, https://github.com/0x9900/qrzlib
Project-URL: Tracker, https://github.com/0x9900/qrzlib/issues
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Telecommunications Industry
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python
Classifier: Topic :: Communications :: Ham Radio
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# qrzlib

Python interface to qrz.com

In order to use this interface you need to have a valid Ham radio
license and a qrz.com account.

## Usage

```python
import qrzlib

qrz = qrzlib.QRZ()
qrz.authenticate('qrz-id', 'xmldata-key')
try:
	call_info = qrz.get_call('W6BSD')
	print(call_info.fullname, call_info.latlon, call_info.grid, call_info.email)
except QRZ.NotFound as err:
	print(err)
```

On the first request the class QRZ get the data from the qrz web
service. Then, by default, the information will be cached forever.

the object QRZ can also return all the fields as a dictionary of as a
json object.

```python
>>> call_info.to_dict()
{'CLASS': 'E',
 'call': 'W6BSD',
 'aliases': 'KM6IGK',
 'dxcc': 291,
 'fname': 'Fred',
 'ccode': 271,
 'lat': 37.460659,
 'lon': -95.543333,
 'grid': 'EM27fl',
 . . .
 'expdate': datetime.date(2027, 3, 3),
 'cqzone': 3,
 'ituzone': 6,
 }
```
