Fast streaming EVTX to CSV exporter
Project description
evtxparser
evtxparser is a focused Python CLI that turns .evtx files into CSV with a streaming, low-overhead pipeline. No GUI, no schema discovery pass, no giant in-memory objects: open the log, walk the records once, write rows.
Goals
- Fast by default: stream records directly from the EVTX file to CSV.
- Simple output: stable columns for common system fields plus compact payload columns.
- Publishable package:
pyproject.toml, console entry point, tests, CI, and PyPI-ready metadata.
Installation
pip install evtxparser
For optional parser and JSON speedups:
pip install "evtxparser[speedups]"
Usage
Export one file to stdout:
evtxparser Security.evtx
Export one file to disk:
evtxparser Security.evtx --output security.csv
Export a directory of logs:
evtxparser /mnt/logs --recursive --output logs.csv
Force a live progress bar on stderr while exporting:
evtxparser Security.evtx --output security.csv --progress
Use multiple CPU cores for a big export:
evtxparser Security.evtx --output security.csv --workers 8
Keep the raw XML in the final CSV column for maximum fidelity:
evtxparser Security.evtx --include-xml --output security.csv
Output schema
| Column | Description |
|---|---|
source_file |
Input EVTX path used for the row |
record_number |
EVTX record number |
timestamp |
Record FILETIME converted to ISO-8601 |
event_id |
Windows event ID |
event_qualifiers |
Optional event qualifiers from <EventID Qualifiers="..."> |
event_version |
Event version |
event_level |
Event level |
event_task |
Event task |
event_opcode |
Event opcode |
event_keywords |
Event keywords |
channel |
Event log channel |
provider_name |
Provider name |
provider_guid |
Provider GUID |
computer |
Computer name |
user_id |
SID from the Security node |
process_id |
Process ID from Execution |
thread_id |
Thread ID from Execution |
activity_id |
Correlation activity ID |
related_activity_id |
Correlation related activity ID |
event_data |
Compact JSON array for ordered EventData items |
user_data |
Compact XML for UserData payloads |
raw_xml |
Included only when --include-xml is set |
event_data is intentionally stored as an ordered JSON array instead of a flattened CSV explosion. That preserves duplicate keys, unnamed fields, and original ordering without a costly pre-scan.
Why this layout is fast
python-evtxmemory-maps the source file.- Records are processed one at a time and written immediately.
- The CSV header is fixed, so there is no schema inference pass.
- The hot path extracts fields directly from the rendered record XML instead of building a second XML tree.
- Event-specific payloads stay compact in two columns instead of forcing dynamic columns.
Progress display
When stderr is interactive, evtxparser shows a live progress bar automatically. It writes progress to stderr, so CSV output stays clean on stdout.
--progress: always show the progress bar--no-progress: disable the progress bar
Parallel export
evtxparser can use multiple processes to go faster on large exports.
--workers 0: auto-select based on CPU count and available EVTX chunks--workers 1: single-process mode--workers N: use exactlyNworker processes, capped by available work
The parallel path preserves CSV row order. It uses worker processes, not threads, because the EVTX parsing hot path is pure Python and benefits more from escaping the GIL.
Development
Create a virtual environment, then install the package with dev tools:
python -m pip install -e ".[dev,speedups]"
Run tests:
pytest
Build distributions:
python -m build
Publishing
The package metadata is defined in pyproject.toml, and the repository includes GitHub Actions workflows for CI and PyPI publishing. Once the repository exists and trusted publishing is configured on PyPI, a GitHub release can publish the package without changing the project layout.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file evtxparser-0.1.0.tar.gz.
File metadata
- Download URL: evtxparser-0.1.0.tar.gz
- Upload date:
- Size: 16.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2af8c18817f905f0cbbad2cb0b00e6a07b94d563dbfd87172319c502eb2238a9
|
|
| MD5 |
42ada894ca176156490dfd640bbba38d
|
|
| BLAKE2b-256 |
751d612917acb2f53a3e9e9265c21d57042d0e32642ab87dced3c2ebdd33c6ca
|
Provenance
The following attestation bundles were made for evtxparser-0.1.0.tar.gz:
Publisher:
publish.yml on samatild/evtxparser
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
evtxparser-0.1.0.tar.gz -
Subject digest:
2af8c18817f905f0cbbad2cb0b00e6a07b94d563dbfd87172319c502eb2238a9 - Sigstore transparency entry: 1633012421
- Sigstore integration time:
-
Permalink:
samatild/evtxparser@ad8bedfd4b5f658977abc66a97bb9e3fc4b738cd -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/samatild
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ad8bedfd4b5f658977abc66a97bb9e3fc4b738cd -
Trigger Event:
release
-
Statement type:
File details
Details for the file evtxparser-0.1.0-py3-none-any.whl.
File metadata
- Download URL: evtxparser-0.1.0-py3-none-any.whl
- Upload date:
- Size: 18.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0190904e462788943973d6be3de5cbcc5a53538bdc01f440581db7962133acd
|
|
| MD5 |
b238e279f3b5c97818742e854e081485
|
|
| BLAKE2b-256 |
a228ac5df8a7775251e6c3e3ef443a308f2f7ef9892f422a93a8e7911816f23f
|
Provenance
The following attestation bundles were made for evtxparser-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on samatild/evtxparser
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
evtxparser-0.1.0-py3-none-any.whl -
Subject digest:
d0190904e462788943973d6be3de5cbcc5a53538bdc01f440581db7962133acd - Sigstore transparency entry: 1633012442
- Sigstore integration time:
-
Permalink:
samatild/evtxparser@ad8bedfd4b5f658977abc66a97bb9e3fc4b738cd -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/samatild
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ad8bedfd4b5f658977abc66a97bb9e3fc4b738cd -
Trigger Event:
release
-
Statement type: