You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Initial Stable - Update documentation and perform final bug fixes (#9)
* Added Gitleaks action scan
* Added definite 3.13 support
* Added documentation
* Added wrappers to our wrappers, so that you need less parameters
* Implemented eQSL graphic retrieval
* Added some logbook.QSO converters to shoot around with types
* Added QRZ insert_record
* Fixed delete_record
* Fixed check_status
* Added some QRZ error tests
---------
Co-authored-by: Jacob Humble <contact@jacobhumble.com>
Copy file name to clipboardExpand all lines: README.md
+10-8Lines changed: 10 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@
8
8
9
9
QSPyLib is a bundle of API wrappers for various amateur radio-related sites, including QRZ, LOTW, eQSL, and ClubLog.
10
10
11
-
It is currently in development and should be considered unstable version-to-version while the version number is still 0.x.x.
11
+
QSPyLib is in active development; that said, major version numbers should maintain API stability. If you need absolute stability of the API, fix your version against the major.
12
12
13
13
Issues and pull requests are welcome, and should be made on the [GitHub repository](https://github.com/jaytotheay/qspy).
14
14
@@ -32,12 +32,14 @@ This will generate a .whl and tar.gz, which you can then install locally.
32
32
33
33
## What works right now?
34
34
35
-
As of v0.0.1:
35
+
As of v1.0.0:
36
36
37
-
* The LotW module is, in theory, finished -- no doubt something will come up about how it's not actually practical and needs more work.
38
-
* The eQSL module has most of the functionality of eQSL's API, but is incredibly unpolished and needs more work.
39
-
* The QRZ module exists; the Logbook API is currently only supported for FETCH operations, and the XML Interface is not supported yet.
40
-
* The ClubLog module is on-hold pending the ready-status of the other modules.
37
+
* The LotW module is, in theory, finished -- you can download QSOs in bulk or by criteria, check DXCC credit, get a list of users and their date of last upload, and upload a log.
38
+
* The eQSL module has most of the functionality of eQSL's API, but is a bit unpolished -- at present, you can fetch inboxes and outboxes, get AG lists, get member lists, get last upload data for users, verify an eQSL, and retrieve the eQSL card graphic for a QSL.
39
+
* The QRZ module is done; for logs, we support fetching logbooks, checking logbook statuses, and inserting and deleting records. For the XML API, we support looking up a callsign's data and looking up a DXCC's data.
40
+
* The ClubLog module only supports grabbing logbooks from ClubLog at the moment.
41
+
42
+
Everything has been tested to work when done "correctly" and simply; no doubt some edge case will pop up, or some failure state won't throw a good error. Please open an issue for *any* problems you come across, no matter how minor, even if it's just an exception that isn't descriptive.
41
43
42
44
## How do I use it?
43
45
@@ -60,8 +62,8 @@ Other functions of APIs are generally available, like checking if an eQSL is ver
This will return a tuple; here, `confirmed` will be False, since this QSO is not verified on eQSL, and `raw_result` will contain any extra information eQSL provides, for instance, if it's Authenticity Guaranteed.
67
+
This will return a tuple; here, `confirmed` will be False, since this QSO is not verified on eQSL, and `raw_result` will contain any extra information eQSL provides, for instance, if it's Authenticity Guaranteed. Note that verify_eqsl is a static method of the eQSLClient class, and can be called either from an eQSLClient object, or directly from the class.
66
68
67
69
Modules, functions, and classes are documented in-code via docstrings, and you can learn more by reading those docstrings; you can also read the [Read the Docs](http://qspylib.readthedocs.io/) listings for a visually pleasing guide on what the docstrings say.
Copy file name to clipboardExpand all lines: docs/source/examples.rst
+118-8Lines changed: 118 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,10 +25,10 @@ Pulling a LotW Logbook and Printing QSLs since Last Login, Using .adi Property
25
25
.. code-block:: python
26
26
27
27
"""This example demonstrates logging into LOTW for a user 'CA7LSIGN' and fetching their QSLs with default parameters. By default, this will only return QSLs received since the last time a logbook was fetched from LOTW.
28
-
28
+
29
29
This example also demonstrates using the .adi property of the Logbook; this property contains a parsed dictionary of the entire .adi log as received from LotW, and you can reference any present fields as dictionary keys.
"""This example demonstrates logging into LOTW for a user 'CA7LSIGN' and fetching their QSOs since 2024-10-01, and then printing them out and grabbing the QSL index.
52
-
51
+
"""This example demonstrates logging into LOTW for a user 'CA7LSIGN' and fetching their QSOs since 2024-10-01, and then printing them out.
52
+
53
53
This example also demonstrates using the .log property of the Logbook; this property contains a list of contacts, and each contains only very limited information about each QSO (the info as seen here.) The QSL property will "unify" the QSL fields as present in ClubLog, QRZ, LoTW, and eQSL, so it is handy for comparing confirmations between sources.
@@ -69,4 +69,114 @@ Pulling a LotW Logbook and Printing QSOs since Last Login, Using .log Property
69
69
70
70
CALL: TE5TBAND: 40MMODE: FT8DATE: 20241003TIME: 003700QSL: N
71
71
72
-
CALL: TE6TBAND: 20MMODE: FT8DATE: 20241003TIME: 004500QSL: N
72
+
CALL: TE6TBAND: 20MMODE: FT8DATE: 20241003TIME: 004500QSL: N
73
+
74
+
Note that you can also use the `fetch_qsos` method to fetch all QSOs; this has a simpler optional parameter set, but takes in a datetime object for date parameters. It also defaults to fetching as much information as LOTW will return about a QSO.
CALL: TE1TBAND: 12MMODE: FT8DATE: 20241003TIME: 025300QSL: Y
86
+
87
+
CALL: TE2TBAND: 12MMODE: FT8DATE: 20241003TIME: 025500QSL: Y
88
+
89
+
CALL: TE3TBAND: 20MMODE: FT8DATE: 20241003TIME: 012100QSL: Y
90
+
91
+
CALL: TE4TBAND: 12MMODE: FT8DATE: 20241003TIME: 012900QSL: N
92
+
93
+
CALL: TE5TBAND: 40MMODE: FT8DATE: 20241003TIME: 003700QSL: N
94
+
95
+
CALL: TE6TBAND: 20MMODE: FT8DATE: 20241003TIME: 004500QSL: N
96
+
97
+
Pulling the inbox from eQSL, using .adi Property
98
+
************************************************
99
+
Pulling information from a user's eQSL inbox is relatively easy with qspylib. The `fetch_inbox` method will return a Logbook object with the inbox contents.
100
+
The .adi portion of the Logbook object will contain all adif fields received from eQSL, and you can reference any present fields as dictionary keys.
101
+
Note that the eQSL divides a logbook into an inbox, and an outbox; the inbox is the QSOs that the user has received, sent for confirmation by other users.
102
+
103
+
.. code-block:: python
104
+
105
+
"""This example demonstrates logging into eQSL for a user 'CA7LSIGN' and fetching their inbox since 2024-01-01 00:00, and then printing them out.
106
+
107
+
This example also demonstrates using the .adi property of the Logbook; this property contains a dictionary of the entire .adi log as received from eQSL,
108
+
where each contact is one record. All the information received from eQSL will be present in the .adi portion of the Logbook object, unlike the .log portion.
eQSL provides for confirming that a QSL is confirmed -- if it was confirmed on eQSL. This can be done by *any* user, not just a logged in one, given they have the proper information.
131
+
132
+
.. code-block:: python
133
+
134
+
"""This example demonstrates confirming an eQSL took place with eQSL."""
'\r\n<HTML>\r\n<HEAD></HEAD>\r\n<BODY>\r\n\r\n\r\n\r\n Error - Result: QSO not on file\r\n </BODY>\r\n </HTML>\r\n'
142
+
143
+
In current versions of qspylib, parsing raw_result for additional information, such as authenticity guaranteed status or the error cause, is left as an exercise for the reader.
144
+
145
+
Retrieving an eQSL Graphic
146
+
**************************
147
+
eQSL provides for retrieving the graphic for the digital QSL card corresponding to a QSO. Note that they request you only do at most, six requests per minute.
148
+
149
+
.. code-block:: python
150
+
151
+
"This example demonstrates retrieving an eQSL graphic for a given QSO and displaying it using PIL."
<PIL.PngImagePlugin.PngImageFile image mode=RGB size=528x336 at 0x0000000000000000>
167
+
>>> image.show() # this will open the actual image file, showing you the image.
168
+
169
+
Looking up a callsign on QRZ
170
+
****************************
171
+
QRZ allows an authenticated user to lookup certain information about a QRZ user. This information will be returned by qspylib as a dictionary that can be parsed, sharing a structure with the XML tree returned by QRZ.
172
+
.. code-block:: python
173
+
174
+
"""This example demonstrates grabbing information about a callsign from QRZ's XML API."""
Copy file name to clipboardExpand all lines: docs/source/index.rst
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,16 +26,16 @@ QSPyLib
26
26
:alt:PyPI - License
27
27
28
28
29
-
``qsyplib`` is a bundle of API wrappers for various amateur radio-related websites, including QRZ, LOTW, eQSL, and ClubLog.
29
+
``qsyplib`` is a bundle of API wrappers for various amateur radio-related sites, including QRZ, LOTW, eQSL, and ClubLog.
30
30
31
-
It is currently in development and should be considered unstable version-to-version while the version number is still 0.x.x.
31
+
QSPyLib is in active development; that said, major version numbers should maintain API stability. If you need absolute stability of the API, fix your version against the major.
32
32
33
33
Issues and pull requests are welcome, and should be made on the [GitHub repository](https://github.com/JayToTheAy/QSPy).
0 commit comments