Python package for converting an EML_NL file to a csv file (osv4-3) format.
Table of Contents
To install the package in your local environment, download the latest built version (.whl)
pip install eml2csv-{version}-py3-none-any.whlAlternatively, you can run the script locally with uv uv run eml2csv --help or download one of the packaged binaries which ship with a python interpreter and required dependencies for use on airgapped systems.
Important
When running the packaged binary on Windows, Visual C++ Redistributable must be installed. If you're using Abacus, you already have this dependency.
If you've downloaded the latest binary release you can generate a .csv file by simply dragging the required files (Telling and Kandidatenlijsten) on the executable. Make sure that you drag both files, and drag from the 'Telling_' file to ensure that it is passed as the first argument.
drag-and-drop.mp4
The package defines a function eml2csv which takes three parameters:
counts_eml_path: str: path to theEML 510bfile for which you want to create the csv filecandidates_eml_path: str: path to theEML 230bfile containing the candidate information. This file has to match the election and 'contest' (Kieskring) of theEML 510bfile and is needed for adding the names of the candidates to the csv fileoutput_csv_path: str: output filename for the csv file. Note: if the file already exists, it will be overwritten!
Example usage:
from eml2csv import eml2csv
eml2csv(
counts_eml_path="Telling_EP2024_gemeente_Juinen.eml.xml",
candidates_eml_path="Kandidatenlijsten_EP2024.eml.xml",
output_csv_path="osv4-3_telling_ep2024_juinen.csv",
)The package also includes a CLI utility for ease of use, run the following from your terminal for help
eml2csv --helpeml2csv is distributed under the terms of the EUPL-1.2 license.