skillfed

python-evtx

Pure Python parser for Windows event log files (.evtx).

python-evtx v0.8.1 163.5K downloads/30d#10,570 on PyPI777
Permissive license Apache-2.0 Active released

What it is and what it does

python-evtx is a pure Python parser that reads Windows Event Log files in the .evtx format introduced with Windows Vista and later. It decodes the proprietary binary XML structure into accessible Python objects, allowing you to extract event records, templates, and metadata programmatically. The package works across Windows, macOS, and Linux, making it useful for analyzing Windows logs from non-Windows systems.

The parser exposes file headers, chunk structures, record templates, and individual event entries through a straightforward API. It includes command-line tools for dumping logs as XML or JSON, verifying chunk checksums, and inspecting templates. The implementation is based on documented format specifications and earlier Perl and C++ parsers, ensuring compatibility with standard .evtx files.

Use it for:

  • Analyze Windows Security event logs from a Linux or macOS forensic workstation
  • Extract and transform event log data into JSON for integration with log aggregation systems
  • Verify the integrity of event log chunks by checking embedded checksums
  • Build custom event log analysis tools that parse .evtx files programmatically
  • Review event templates and their structure within a log file for debugging or auditing

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Parses Windows Event Log files (.evtx) into structured XML or JSON, providing programmatic access to event records, templates, and metadata across Windows, macOS, and Linux.

Yes. The package is actively maintained, has no known vulnerabilities, installs with minimal friction, and uses a permissive Apache-2.0 license. It fills a specific need for cross-platform .evtx parsing with a straightforward API. Install it if you need to read Windows event logs outside Windows or integrate event log data into analysis pipelines.

Install

python-evtx on PyPI

pip

pip install python-evtx

uv

uv add python-evtx

poetry

poetry add python-evtx

Installing python-evtx

Before you install

Low friction: pure Python wheel with a single runtime dependency (hexdump). Actively maintained with recent commits and stable status since 2013.

License in practice

Apache-2.0 permissive license allows free use, modification, and redistribution in personal and professional contexts without significant restrictions.

Quickstart

pip install python-evtx

from Evtx.Evtx import Evtx

with Evtx('Security.evtx') as log:
    for record in log.records:
        print(record.xml())

Verify before relying

  • Whether hexdump is available on all target platforms or if it must be installed separately
  • Performance characteristics when parsing large event log files (hundreds of megabytes)

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies 1 — hexdump
Maintenance actively maintained — 469 days since the last release
Last repo commit
First released
Downloads 163,514/month — #10,570 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: python_evtx-0.8.1-py3-none-any.whl

Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: Information TechnologyOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Topic :: SecurityTopic :: Software Development :: Libraries :: Python ModulesTopic :: System :: Logging

Tags

windows event log parserevtx file readerparse .evtx fileswindows event log analysisbinary xml event logcross-platform evtx parserevent log to xml conversion
forensicslog-analysiswindows-events

More Python Modules packages