High-performance ETW (Event Tracing for Windows) consumer library for Python
Project description
PyETWkit
A modern, high-performance ETW (Event Tracing for Windows) toolkit for Python, powered by a Rust backend.
Features
- Real-time ETW streaming with sync API
- Kernel providers: process, thread, registry, file, disk, network
- User providers: DNS, Audio, and more via profiles
- Filtering: by provider, event ID, trace level
- ETL file reading: Parse existing trace logs
- Export: CSV, JSON, JSONL, Parquet, Arrow formats
- CLI tool:
pyetwkitcommand for quick monitoring - Provider discovery: Search and list available providers
- Pre-configured profiles: Audio, network, security scenarios
- Rust backend (pyo3): High throughput, zero-copy event delivery
- Windows 10 / 11 / Server supported
Installation
pip install pyetwkit
Quick Start
CLI Usage
# List available providers
pyetwkit providers
pyetwkit providers --search Kernel
# List profiles
pyetwkit profiles
# Listen to events (requires admin)
pyetwkit listen Microsoft-Windows-DNS-Client
pyetwkit listen --profile network
# Export ETL file
pyetwkit export trace.etl -o events.csv
pyetwkit export trace.etl -o events.parquet -f parquet
Python API
from pyetwkit._core import EtwProvider, EtwSession
# Create session
session = EtwSession("MySession")
# Add provider
provider = EtwProvider(
"Microsoft-Windows-DNS-Client",
"DNS-Client"
)
provider = provider.with_level(4) # Info level
session.add_provider(provider)
# Start and process events
session.start()
try:
while True:
event = session.next_event_timeout(1000)
if event:
print(f"Event {event.event_id}: {event.provider_name}")
except KeyboardInterrupt:
pass
finally:
session.stop()
Kernel Tracing
from pyetwkit._core import PyKernelFlags, PyKernelSession
flags = PyKernelFlags()
flags = flags.with_process() # Enable process events
session = PyKernelSession(flags)
session.start()
for _ in range(10):
event = session.next_event_timeout(1000)
if event and event.event_id == 1: # Process start
props = event.to_dict().get("properties", {})
print(f"Process: {props.get('ImageFileName')}")
session.stop()
Provider Discovery
from pyetwkit._core import list_providers, search_providers
# List all providers
for p in list_providers()[:10]:
print(f"{p.name}: {p.guid}")
# Search by name
for p in search_providers("Kernel"):
print(p.name)
Export Events
from pyetwkit._core import EtlReader
from pyetwkit.export import to_csv, to_parquet
# Read ETL file
reader = EtlReader("trace.etl")
events = list(reader.events())
# Export to various formats
to_csv(events, "events.csv")
to_parquet(events, "events.parquet")
Architecture
Python API / CLI
↓
pyetwkit (Python package)
↓
pyetwkit._core (Rust/pyo3)
↓
ferrisetw (Rust ETW library)
↓
Windows ETW subsystem
Documentation
- Tutorial - Comprehensive usage guide
- API Reference - Detailed API documentation
- Examples - Sample scripts
- Architecture - Design documents
Roadmap
Completed
- Rust ETW consumer (ferrisetw backend)
- Provider discovery and enumeration
- User-mode ETW sessions
- Kernel-mode tracing (process, thread, image load)
- Event schema and property parsing
- ETL file reading
- Export to CSV, JSON, JSONL, Parquet, Arrow
- CLI tool (
pyetwkitcommand) - Provider profiles (audio, network, security)
- Stack trace capture support
- Session statistics
Planned
v1.1 - Enhanced Core
v2.0 - Enterprise Features
- Multi-session / Multi-provider concurrent subscription
- Kernel + User + Custom providers simultaneously
- Unified event stream delivery
- OpenTelemetry (OTLP) Exporter
- Integration with Jaeger, Grafana, Datadog
- Enterprise observability standard
- ETW Recording & Replay (.etwpack)
- Python-optimized capture format
- Faster than native ETL files
v3.0 - Advanced Analysis
- Event Correlation Engine
- Auto-correlate by PID/TID/Handle
- Unified activity timelines
- "Wireshark for ETW" level insight
- Live Dashboard with WebSocket UI
- Browser-based real-time visualization
- CPU, Network, Disk, Audio monitoring
- VRChat/Unity/OBS support
Examples
See the examples/ directory for complete sample scripts:
basic_session.py- Simple ETW sessionkernel_trace.py- Kernel-level process monitoringexport_events.py- Capture and export eventsprovider_discovery.py- Find ETW providersprofiles.py- Use pre-configured profilesread_etl.py- Read ETL files
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
Author
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
Built Distributions
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 pyetwkit-1.1.0.tar.gz.
File metadata
- Download URL: pyetwkit-1.1.0.tar.gz
- Upload date:
- Size: 57.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b27d390418a13f01787e354e1b784c292dafe039e38fc7162bdf5f3df7580c19
|
|
| MD5 |
7e3da003366c0a993f5d51afcb247ae0
|
|
| BLAKE2b-256 |
410a7e57249ec13757bb6d7085859f3b9ed33a469ed0188e53e006fca65a0056
|
Provenance
The following attestation bundles were made for pyetwkit-1.1.0.tar.gz:
Publisher:
release.yml on m96-chan/PyETWkit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyetwkit-1.1.0.tar.gz -
Subject digest:
b27d390418a13f01787e354e1b784c292dafe039e38fc7162bdf5f3df7580c19 - Sigstore transparency entry: 759667605
- Sigstore integration time:
-
Permalink:
m96-chan/PyETWkit@fab87218a33db096820f6b20eb68709ad7aa8672 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/m96-chan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@fab87218a33db096820f6b20eb68709ad7aa8672 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pyetwkit-1.1.0-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: pyetwkit-1.1.0-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 404.6 kB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e378493672fe4d88bf530c6845d412c624005dc35a0cb0ddb0800e8608cbd093
|
|
| MD5 |
1f03e4ee40453d9c61aa9c45a0d78a10
|
|
| BLAKE2b-256 |
c06a8db7766083cb27665b4809a9fbd94cab6d23a8a4e6aa3ed82fbc04b23dcd
|
Provenance
The following attestation bundles were made for pyetwkit-1.1.0-cp313-cp313-win_amd64.whl:
Publisher:
release.yml on m96-chan/PyETWkit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyetwkit-1.1.0-cp313-cp313-win_amd64.whl -
Subject digest:
e378493672fe4d88bf530c6845d412c624005dc35a0cb0ddb0800e8608cbd093 - Sigstore transparency entry: 759667683
- Sigstore integration time:
-
Permalink:
m96-chan/PyETWkit@fab87218a33db096820f6b20eb68709ad7aa8672 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/m96-chan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@fab87218a33db096820f6b20eb68709ad7aa8672 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pyetwkit-1.1.0-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: pyetwkit-1.1.0-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 404.9 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b6481c51477a9aea0f69b9e17f153a35a628ee218fd8988bd83a1dc7d115f844
|
|
| MD5 |
d4e51a6ac91c128a9ac61fc74c8ac3f2
|
|
| BLAKE2b-256 |
3ff2f2c88565c109a1be08237785917838b82149bdfbdfae3382fc09d1aedfe9
|
Provenance
The following attestation bundles were made for pyetwkit-1.1.0-cp312-cp312-win_amd64.whl:
Publisher:
release.yml on m96-chan/PyETWkit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyetwkit-1.1.0-cp312-cp312-win_amd64.whl -
Subject digest:
b6481c51477a9aea0f69b9e17f153a35a628ee218fd8988bd83a1dc7d115f844 - Sigstore transparency entry: 759667705
- Sigstore integration time:
-
Permalink:
m96-chan/PyETWkit@fab87218a33db096820f6b20eb68709ad7aa8672 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/m96-chan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@fab87218a33db096820f6b20eb68709ad7aa8672 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pyetwkit-1.1.0-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: pyetwkit-1.1.0-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 404.6 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f189ac70b07d576e5e45be60a07abaa0310a59720346319bb9f37989c0031a73
|
|
| MD5 |
44b5ae62bb639bdb9b7c1fb485793d7c
|
|
| BLAKE2b-256 |
7634d049fb7eb6e16043568a3a016faa8a4a9f673ff4daeb98de3476c94b0a81
|
Provenance
The following attestation bundles were made for pyetwkit-1.1.0-cp311-cp311-win_amd64.whl:
Publisher:
release.yml on m96-chan/PyETWkit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyetwkit-1.1.0-cp311-cp311-win_amd64.whl -
Subject digest:
f189ac70b07d576e5e45be60a07abaa0310a59720346319bb9f37989c0031a73 - Sigstore transparency entry: 759667632
- Sigstore integration time:
-
Permalink:
m96-chan/PyETWkit@fab87218a33db096820f6b20eb68709ad7aa8672 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/m96-chan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@fab87218a33db096820f6b20eb68709ad7aa8672 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pyetwkit-1.1.0-cp310-cp310-win_amd64.whl.
File metadata
- Download URL: pyetwkit-1.1.0-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 404.7 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc11b8161ed23f62433fa732931017eea5374e809e786bf1e7e4f2c1efc6bed0
|
|
| MD5 |
37f14ec526adbaa2f266257d68d73e49
|
|
| BLAKE2b-256 |
1c29d061988861c2ff6d1562f72b237efa18ac3db6b3ba100a82cb1b6865a15d
|
Provenance
The following attestation bundles were made for pyetwkit-1.1.0-cp310-cp310-win_amd64.whl:
Publisher:
release.yml on m96-chan/PyETWkit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyetwkit-1.1.0-cp310-cp310-win_amd64.whl -
Subject digest:
bc11b8161ed23f62433fa732931017eea5374e809e786bf1e7e4f2c1efc6bed0 - Sigstore transparency entry: 759667723
- Sigstore integration time:
-
Permalink:
m96-chan/PyETWkit@fab87218a33db096820f6b20eb68709ad7aa8672 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/m96-chan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@fab87218a33db096820f6b20eb68709ad7aa8672 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pyetwkit-1.1.0-cp39-cp39-win_amd64.whl.
File metadata
- Download URL: pyetwkit-1.1.0-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 405.3 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ad994c102e87a7f1cf0161b31f3d04c35c2ccae87c0ec94ee579d65a92c999c
|
|
| MD5 |
7581be96e6eed7c7588464dcd0d9dd6c
|
|
| BLAKE2b-256 |
ba30a3981948da7e3f970a1ba80d53e901dc7296e6752dbdd2382ec3fa9c9f06
|
Provenance
The following attestation bundles were made for pyetwkit-1.1.0-cp39-cp39-win_amd64.whl:
Publisher:
release.yml on m96-chan/PyETWkit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyetwkit-1.1.0-cp39-cp39-win_amd64.whl -
Subject digest:
2ad994c102e87a7f1cf0161b31f3d04c35c2ccae87c0ec94ee579d65a92c999c - Sigstore transparency entry: 759667658
- Sigstore integration time:
-
Permalink:
m96-chan/PyETWkit@fab87218a33db096820f6b20eb68709ad7aa8672 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/m96-chan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@fab87218a33db096820f6b20eb68709ad7aa8672 -
Trigger Event:
release
-
Statement type: