skillfed

winrt-runtime

Python projection of Windows Runtime (WinRT) APIs

winrt-runtime v3.2.1 379.9K downloads/30d#7,108 on PyPI196
Permissive license MIT AGING released

What it is and what it does

PyWinRT is a Python projection layer for Windows Runtime APIs, allowing developers to call WinRT functions directly from Python without C++ intermediaries. It wraps hardware access (Bluetooth, USB, serial, cameras), OS features (notifications, screen capture), and UI frameworks (WinUI 2 and WinUI 3) into Python-friendly interfaces. The package is modular—winrt-runtime provides the base runtime and type infrastructure, while individual namespace packages (installed separately) expose specific API groups.

The project is a community-maintained fork of Microsoft's original xlang tool. It generates Python bindings from Windows SDK metadata, supporting both the standard Windows SDK and custom WinRT components. Installation is straightforward on Windows but platform-specific; the package ships pre-built wheels for Python 3.9 through 3.14 across 32-bit, 64-bit, and ARM architectures. Typical usage involves importing from the winrt namespace hierarchy and calling async methods to interact with Windows services.

Use it for:

  • Build desktop applications that access hardware like Bluetooth devices, USB ports, or cameras directly from Python.
  • Integrate Windows OS notifications, screen capture, or other system features into Python applications.
  • Develop WinUI 2 or WinUI 3 graphical applications using Python instead of C# or C++.
  • Generate Python bindings for custom WinRT components using the PyWinRT code generation tool.
  • Prototype or automate Windows system tasks that require low-level hardware or OS API access.

Worth the install?

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

Provides Python bindings to access Windows Runtime (WinRT) APIs, enabling direct interaction with Windows hardware, OS features, and UI frameworks from Python code.

Yes, if you are on Windows and need direct access to WinRT APIs. The package is well-maintained enough (active repo, no known vulnerabilities, permissive license), but install friction is high—Windows-only, modular dependencies, and aging codebase status. Suitable for developers building Windows-specific tools, hardware integrations, or WinUI applications; not applicable on macOS or Linux.

Install

winrt-runtime on PyPI

pip

pip install winrt-runtime

uv

uv add winrt-runtime

poetry

poetry add winrt-runtime

Installing winrt-runtime

Before you install

Medium friction: platform-specific wheels for Windows only (Python 3.9–3.14, 32/64/ARM architectures). Maintenance status is aging—last commit December 2025, but repository remains active and not archived. Dependency on typing_extensions is minimal.

License in practice

MIT license is permissive; you may use, modify, and distribute this package freely with minimal restrictions, provided you retain the license notice.

Quickstart

pip install winrt-runtime

from winrt.system import Object
from winrt.windows.media.speechsynthesis import SpeechSynthesizer

synth = SpeechSynthesizer()
stream = await synth.synthesize_text_to_stream_async("Hello, World!")

Windows-only; requires Python 3.9 or later. Modular design means you must install additional namespace packages (e.g., winrt-Windows.Media.SpeechSynthesis) for specific WinRT APIs beyond the runtime base.

Verify before relying

  • Whether all Windows SDK namespaces are currently available as separate packages and their coverage completeness.
  • Performance characteristics and overhead of Python-to-WinRT marshalling for real-time or latency-sensitive operations.
  • Stability and compatibility guarantees for the aging codebase given the last commit was December 2025.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.9)
Install friction medium — platform-specific wheel
Runtime dependencies 1 — typing_extensions
Maintenance aging — 434 days since the last release
Last repo commit
First released
Downloads 379,926/month — #7,108 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: winrt_runtime-3.2.1-cp310-cp310-win32.whl; winrt_runtime-3.2.1-cp310-cp310-win_amd64.whl; winrt_runtime-3.2.1-cp310-cp310-win_arm64.whl; winrt_runtime-3.2.1-cp311-cp311-win32.whl; winrt_runtime-3.2.1-cp311-cp311-win_amd64.whl; winrt_runtime-3.2.1-cp311-cp311-win_arm64.whl; winrt_runtime-3.2.1-cp312-cp312-win32.whl; winrt_runtime-3.2.1-cp312-cp312-win_amd64.whl; winrt_runtime-3.2.1-cp312-cp312-win_arm64.whl; winrt_runtime-3.2.1-cp313-cp313-win32.whl; winrt_runtime-3.2.1-cp313-cp313-win_amd64.whl; winrt_runtime-3.2.1-cp313-cp313-win_arm64.whl; winrt_runtime-3.2.1-cp314-cp314-win32.whl; winrt_runtime-3.2.1-cp314-cp314-win_amd64.whl; winrt_runtime-3.2.1-cp314-cp314-win_arm64.whl; winrt_runtime-3.2.1-cp39-cp39-win32.whl; winrt_runtime-3.2.1-cp39-cp39-win_amd64.whl; winrt_runtime-3.2.1-cp39-cp39-win_arm64.whl

Intended Audience :: DevelopersOperating System :: Microsoft :: WindowsProgramming Language :: Python :: 3Programming Language :: Python :: Implementation :: CPython

Tags

windows runtime python bindingswinrt api access pythonwindows hardware from pythonwindows notifications pythonwinui python developmentbluetooth usb python windowswindows os features python
windows-onlyhardware-accessasync-io

More Software Development packages

typing-extensions

Provides backported and experimental type hints…

permissive · top 100 on PyPI

numpy

NumPy provides an N-dimensional array object…

permissive · top 100 on PyPI

fastapi

FastAPI is a Python web framework for building…

permissive · top 100 on PyPI

annotated-doc

Provides a way to document function parameters,…

permissive · top 100 on PyPI

typer

Typer builds command-line applications from…

permissive · top 1,000 on PyPI

distlib

Distlib provides low-level packaging utilities…

permissive · top 1,000 on PyPI

winrt-Windows.Devices.Bluetooth

Provides Python bindings to Windows Runtime…

permissive · top 15,000 on PyPI

winrt-Windows.Devices.Radios

Provides Python bindings to access Windows…

permissive · top 15,000 on PyPI

winrt-Windows.Foundation

Provides Python bindings to Windows Runtime…

permissive · top 15,000 on PyPI

winrt-Windows.Globalization

Provides Python bindings to Windows Runtime…

permissive · top 15,000 on PyPI

winrt-Windows.Graphics.Imaging

Provides Python bindings to Windows Runtime…

permissive · top 15,000 on PyPI

winrt-Windows.Media.Ocr

Provides Python bindings to Windows Runtime…

permissive · top 15,000 on PyPI

winrt-Windows.Storage.Streams

Provides Python bindings to Windows Runtime…

permissive · top 15,000 on PyPI

winrt-Windows.Devices.Bluetooth.Advertisement

Provides Python bindings to access Windows…

permissive · top 15,000 on PyPI

winrt-Windows.Devices.Bluetooth.GenericAttributeProfile

Provides Python bindings to access Windows…

permissive · top 15,000 on PyPI

winrt-Windows.Foundation.Collections

Provides Python bindings for Windows Runtime…

permissive · top 15,000 on PyPI