python-evtx
Pure Python parser for Windows event log files (.evtx).
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-evtxuv
uv add python-evtxpoetry
poetry add python-evtxInstalling 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
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
winevtWinevt lets you query and subscribe to Windows…
permissive · top 15,000 on PyPI
JSON-log-formatterFormats Python logging records as JSON,…
permissive · top 5,000 on PyPI
python-hwpxReads, edits, and creates HWPX documents…
permissive · top 15,000 on PyPI
dicttoxmlConverts Python dictionaries and other native…
copyleft · top 5,000 on PyPI
datadog-loggerSends Python log messages to Datadog as Events…
permissive · top 15,000 on PyPI
pycomposefileParses and deserializes Docker Compose files…
permissive · top 5,000 on PyPI
docxCreates, reads, and writes Microsoft Office…
unclear · top 15,000 on PyPI
docx2pythonExtracts text, images, headers, footers,…
permissive · top 15,000 on PyPI
xmltodictConverts XML to Python dictionaries and back,…
permissive · top 1,000 on PyPI
data-to-xmlConverts Python dictionaries and lists into XML…
unclear · top 15,000 on PyPI