Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,19 @@ jobs:
- name: Install wheel and test dependencies
run: |
uv pip install pytest pytest-asyncio pytest-cov
$wheel = Get-ChildItem dist/*.whl | Select-Object -First 1
uv pip install $wheel.FullName
# List all wheels in dist/ to debug version issues
Get-ChildItem dist/*.whl | ForEach-Object { Write-Host "Found wheel: $($_.Name)" }
# Get Python minor version for matching wheel (use venv Python)
$pyVer = & .\.venv\Scripts\python.exe -c "import sys; print(f'cp{sys.version_info.major}{sys.version_info.minor}')"
Write-Host "Looking for wheel matching Python version: $pyVer"
# Install the wheel matching this Python version
$wheel = Get-ChildItem dist/*.whl | Where-Object { $_.Name -match $pyVer } | Select-Object -First 1
if ($wheel -eq $null) {
Write-Host "ERROR: No wheel found for $pyVer"
exit 1
}
Write-Host "Installing wheel: $($wheel.FullName)"
uv pip install "$($wheel.FullName)"
shell: pwsh

- name: Run tests
Expand Down
35 changes: 35 additions & 0 deletions src/pyetwkit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@

# Import high-level Python APIs
# v1.1: Enhanced APIs
# Re-export KernelFlags and KernelSession from _core
import contextlib

from pyetwkit.async_api import AsyncEtwSession, EventBatcher, gather_events, stream_to_queue
from pyetwkit.filtering import (
EventFilter,
Expand All @@ -67,13 +70,29 @@
provider_filter,
)
from pyetwkit.listener import EtwListener

# v2.0: Manifest-based typed events
from pyetwkit.manifest import (
EventDefinition,
FieldDefinition,
ManifestCache,
ManifestParser,
ProviderManifest,
TypedEventFactory,
)

# v2.0: Multi-session support
from pyetwkit.multi_session import MultiSession
from pyetwkit.providers import (
FileProvider,
KernelProvider,
NetworkProvider,
ProcessProvider,
RegistryProvider,
)

# v2.0: Rust-side filtering
from pyetwkit.rust_filter import RustEventFilter
from pyetwkit.streamer import EtwStreamer
from pyetwkit.typed_events import (
DnsQueryEvent,
Expand All @@ -89,6 +108,9 @@
to_typed_event,
)

with contextlib.suppress(ImportError):
from pyetwkit._core import KernelFlags, KernelSession

__all__ = [
# Version info
"__version__",
Expand Down Expand Up @@ -134,6 +156,19 @@
"TcpConnectEvent",
"TcpDisconnectEvent",
"to_typed_event",
# v2.0: Multi-session
"MultiSession",
"KernelFlags",
"KernelSession",
# v2.0: Rust-side filtering
"RustEventFilter",
# v2.0: Manifest-based typed events
"ManifestParser",
"ProviderManifest",
"EventDefinition",
"FieldDefinition",
"TypedEventFactory",
"ManifestCache",
]


Expand Down
Loading
Loading