Skip to main content

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

  1. python-evtx memory-maps the source file.
  2. Records are processed one at a time and written immediately.
  3. The CSV header is fixed, so there is no schema inference pass.
  4. The hot path extracts fields directly from the rendered record XML instead of building a second XML tree.
  5. 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 exactly N worker 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

evtxparser-0.1.0.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

evtxparser-0.1.0-py3-none-any.whl (18.6 kB view details)

Uploaded Python 3

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

Hashes for evtxparser-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2af8c18817f905f0cbbad2cb0b00e6a07b94d563dbfd87172319c502eb2238a9
MD5 42ada894ca176156490dfd640bbba38d
BLAKE2b-256 751d612917acb2f53a3e9e9265c21d57042d0e32642ab87dced3c2ebdd33c6ca

See more details on using hashes here.

Provenance

The following attestation bundles were made for evtxparser-0.1.0.tar.gz:

Publisher: publish.yml on samatild/evtxparser

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for evtxparser-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d0190904e462788943973d6be3de5cbcc5a53538bdc01f440581db7962133acd
MD5 b238e279f3b5c97818742e854e081485
BLAKE2b-256 a228ac5df8a7775251e6c3e3ef443a308f2f7ef9892f422a93a8e7911816f23f

See more details on using hashes here.

Provenance

The following attestation bundles were made for evtxparser-0.1.0-py3-none-any.whl:

Publisher: publish.yml on samatild/evtxparser

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page