winrt-Windows.Media.Ocr
Python projection of Windows Runtime (WinRT) APIs
What it is and what it does
This package exposes Windows Runtime OCR functionality through Python bindings, part of the modular PyWinRT project that wraps individual Windows SDK namespaces. It allows developers to perform optical character recognition on images using the native Windows Media.Ocr API without external dependencies like Tesseract or cloud services.
The package is Windows-only and requires Python 3.9 or later. It depends on winrt-runtime and is distributed as platform-specific wheels for 32-bit, 64-bit, and ARM64 Windows architectures across Python versions 3.9 through 3.14. OCR operations are async-first, following WinRT's asynchronous design patterns. The project is community-maintained as part of PyWinRT, which evolved from Microsoft's original xlang project and now publishes modular bindings for individual Windows SDK namespaces.
Use it for:
- Extract text from screenshots or captured images in Windows desktop applications without external OCR services.
- Build document scanning utilities that convert images to searchable text using native Windows capabilities.
- Automate UI testing by reading text from application windows or screenshots programmatically.
- Process scanned documents or photos to extract and index text content locally on Windows machines.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides Python bindings to Windows Runtime (WinRT) optical character recognition APIs, enabling text extraction from images using native Windows OCR capabilities.
Yes, if you are building a Windows-only application that needs OCR and can accept the async/await pattern. The MIT license is permissive, there are no known vulnerabilities, and the package integrates directly with Windows' built-in OCR engine, avoiding external service dependencies. Maintenance is aging but stable; last commit was recent. Not suitable for cross-platform projects or applications requiring synchronous OCR calls.
Install
winrt-windows-media-ocr on PyPI
pip
pip install winrt-windows-media-ocruv
uv add winrt-windows-media-ocrpoetry
poetry add winrt-windows-media-ocrInstalling winrt-Windows.Media.Ocr
Before you install
Medium install friction: Windows-only platform wheels for Python 3.9–3.14 (win32, win_amd64, win_arm64). Requires winrt-runtime as a runtime dependency. Last commit 2025-12-11 with aging maintenance status—no recent activity beyond dependency updates.
License in practice
MIT license permits commercial and private use with minimal restrictions, making this suitable for most projects that can run on Windows.
Quickstart
pip install winrt-Windows.Media.Ocr
from winrt.windows.media.ocr import OcrEngine
engine = OcrEngine.try_create_from_user_profile()
result = await engine.recognize_async(bitmap)
Windows-only; requires Python 3.9 or later and winrt-runtime installed. OCR operations are typically async and require a valid bitmap image object.
Verify before relying
- Whether the package includes language support beyond English or how language selection works.
- Performance characteristics and typical latency for OCR operations on various image sizes.
- Whether bitmap objects can be created directly from file paths or if additional image-handling libraries are required.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 1 — winrt-runtime |
| Maintenance | aging — 434 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 119,547/month — #12,067 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: winrt_windows_media_ocr-3.2.1-cp310-cp310-win32.whl; winrt_windows_media_ocr-3.2.1-cp310-cp310-win_amd64.whl; winrt_windows_media_ocr-3.2.1-cp310-cp310-win_arm64.whl; winrt_windows_media_ocr-3.2.1-cp311-cp311-win32.whl; winrt_windows_media_ocr-3.2.1-cp311-cp311-win_amd64.whl; winrt_windows_media_ocr-3.2.1-cp311-cp311-win_arm64.whl; winrt_windows_media_ocr-3.2.1-cp312-cp312-win32.whl; winrt_windows_media_ocr-3.2.1-cp312-cp312-win_amd64.whl; winrt_windows_media_ocr-3.2.1-cp312-cp312-win_arm64.whl; winrt_windows_media_ocr-3.2.1-cp313-cp313-win32.whl; winrt_windows_media_ocr-3.2.1-cp313-cp313-win_amd64.whl; winrt_windows_media_ocr-3.2.1-cp313-cp313-win_arm64.whl; winrt_windows_media_ocr-3.2.1-cp314-cp314-win32.whl; winrt_windows_media_ocr-3.2.1-cp314-cp314-win_amd64.whl; winrt_windows_media_ocr-3.2.1-cp314-cp314-win_arm64.whl; winrt_windows_media_ocr-3.2.1-cp39-cp39-win32.whl; winrt_windows_media_ocr-3.2.1-cp39-cp39-win_amd64.whl; winrt_windows_media_ocr-3.2.1-cp39-cp39-win_arm64.whl
Tags
More Text Processing packages
A drop-in replacement for Python's standard…
permissive · top 100 on PyPI
pyparsingpyparsing provides a library for building text…
permissive · top 1,000 on PyPI
docutilsDocutils converts plaintext documentation in…
unclear · top 1,000 on PyPI
RapidFuzzRapidFuzz provides fast fuzzy string matching…
permissive · top 1,000 on PyPI
tinycss2tinycss2 parses CSS strings into token and…
permissive · top 1,000 on PyPI
llama-parseLlamaParse parses complex documents (PDFs,…
permissive · top 1,000 on PyPI
winrt-runtimeProvides Python bindings to access Windows…
permissive · top 15,000 on PyPI
winrt-Windows.FoundationProvides Python bindings to Windows Runtime…
permissive · top 15,000 on PyPI
winrt-Windows.Storage.StreamsProvides Python bindings to Windows Runtime…
permissive · top 15,000 on PyPI
winrt-Windows.Graphics.ImagingProvides Python bindings to Windows Runtime…
permissive · top 15,000 on PyPI
winrt-Windows.Devices.Bluetooth.AdvertisementProvides Python bindings to access Windows…
permissive · top 15,000 on PyPI
winrt-Windows.Devices.BluetoothProvides Python bindings to Windows Runtime…
permissive · top 15,000 on PyPI
winrt-Windows.GlobalizationProvides Python bindings to Windows Runtime…
permissive · top 15,000 on PyPI
winrt-Windows.Devices.RadiosProvides Python bindings to access Windows…
permissive · top 15,000 on PyPI
winrt-Windows.Devices.EnumerationProvides Python bindings to Windows Runtime…
permissive · top 15,000 on PyPI
winrt-Windows.Foundation.CollectionsProvides Python bindings for Windows Runtime…
permissive · top 15,000 on PyPI