
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
PyADIF-File
Advanced tools
Author: Andreas Schawo, DF1ASC (HamQTH, eQSL)
Convert ADIF ADI content (ham radio QSO logs) to dictionary and vice versa
The required/resulting dictionary format for ADI is
{
'HEADER':
{'ADIF_HEADER_FIELD_NAME': 'Value',
'USERDEFS': [list of user definitions]},
'RECORDS': [list of records]
}
For ADI the header or each record is/must be a dictionary in the format
{
'ADIF_FIELD_NAME': 'Value',
}
The value can be a str, int, float or bool. Booleans are translated to Y or N.
For ADI a user definition is a dictionary of
{
'dtype': one char representing the type,
'userdef': the field definition text
}
The library also supports ADX import/export as compatible as possible to the ADI part. Though it will differ in handling application and user definitions. It relys on the ADX schemas from adif.org. For the ADX import there is no validation by default to be able to read fast.
For more details visit the API documentation
See example.py for a complete example.
Running example.py should produce example.adi and example.adx.
The package is available via PyPI
pip install pyadif-file
For reading and writing files you can use adi.load or adi.dump.
There is a corresponding variant for handling string: adi.loads and adi.dumps.
Here is an example for reading an ADI file:
from adif_file import adi
adi_doc = adi.load('qsos.adi')
for rec in adi_doc['RECORDS']:
if "CALL" in rec:
print(f'QSO on {rec["QSO_DATE"]} at {rec["TIME_ON"]} with {rec["CALL"]}')
====
QSO on 20231008 at 1145 with DL4BDF
QSO on 20231008 at 1146 with DL5HJK
QSO on 20231009 at 1147 with M3KJH
QSO on 20231010 at 1148 with HB4FDS
If an empty header is provided, the fields are generated with suiting defaults. Missing header fields are inserted.
Empty record fields and empty records are not exported at all.
*_INTL fields are not exported (see ADIF specification).
Non ASCII characters are substituted on export by default with an underscore _. A warning will be raised.
Deactivating this will rais an exception for each field containing non ASCII chars.
To substitute non ASCII chars you may want to provide a different substitution char e.g. # or a substitution map e.g.
for german lang {'ä': 'ae', 'ß': 'ss'}.
The source code is available at Codeberg
PyADIF-File © 2023-2025 by Andreas Schawo is licensed under CC BY-SA 4.0
PyADIF-File uses
FAQs
Convert ADIF ADI/ADX content to dictionary and vice versa
We found that PyADIF-File demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.