Registry / http-networking / twisted-iocpsupport

twisted-iocpsupport

JSON →
library25.10.1pypypiunverified

twisted-iocpsupport provides a C extension for Twisted's I/O Completion Ports (IOCP) reactor, primarily used on Windows for high-performance asynchronous I/O. It enhances the `twisted.internet.iocpreactor` module, making the IOCP reactor available for use. The current version is 25.10.1, with releases typically tied to Twisted's release cycle and Python version support, focusing on platform compatibility and binary wheels.

pip install twisted-iocpsupport
INSTALL
IMPORT
SIG · TWISTED-IOCPSUPPOR
T
twisted-iocpsupport
http-networkingpythonv25.10.1
Install
Import
Disk
Pass rate
0/ 10
Env Coverage0 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v? · pip install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
build_error
glibc
py 3.103.910 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

iocpreactor
from twisted.internet import iocpreactor
This library provides the underlying C extension for `twisted.internet.iocpreactor`. User code typically imports the `iocpreactor` module and then calls `iocpreactor.install()` to activate the IOCP reactor.

Demonstrates how to install and run a basic Twisted echo server using the IOCP reactor on Windows, which utilizes the `twisted-iocpsupport` extension for high-performance I/O. This example will only run the server if executed on a Windows operating system.

import os from twisted.internet import protocol, reactor # This library provides the underlying C extension for the IOCP reactor. # The IOCP reactor is Windows-specific and offers performance benefits there. if os.name == 'nt': from twisted.internet import iocpreactor iocpreactor.install() class Echo(protocol.Protocol): def dataReceived(self, data): self.transport.write(data) class EchoFactory(protocol.Factory): def buildProtocol(self, addr): return Echo() print("Starting IOCP reactor echo server on port 8000 (Windows only)...") reactor.listenTCP(8000, EchoFactory()) reactor.run() else: print("IOCP reactor is Windows-specific. Skipping quickstart on non-Windows OS.") print("Install and run on Windows to test this library's functionality.")
Debug
Known issues
gotchaThis library is platform-specific and primarily designed for Windows. While it might install on other systems, its functionality (the IOCP reactor) is only available and beneficial on Windows.
fix
Only install and use `twisted-iocpsupport` on Windows platforms for its intended purpose. On other operating systems, Twisted will default to other reactors (e.g., epoll, kqueue, select).
affects: All versions
gotchaTo activate the IOCP reactor provided by this extension, `iocpreactor.install()` must be explicitly called before other reactor-related operations.
fix
Ensure that `from twisted.internet import iocpreactor; iocpreactor.install()` is called at the very beginning of your application's lifecycle, before any calls to `reactor.run()` or `reactor.listenTCP()`.
affects: All versions
gotchaInstallation can fail if pre-built wheels are not available for your specific Python version and architecture, requiring compilation from source.
fix
On Windows, ensure you have the appropriate Microsoft C++ Build Tools installed (e.g., Visual C++ 14.0 or greater). Check the `pip install` logs for specific compiler errors. Using a Python version for which pre-built wheels exist is often the easiest solution.
affects: All versions
Upgrade
Version history
25.10.1latest on PyPI · released Oct 28, 2025
Audit
Dependencies
twistedrequiredThis library is a C extension for Twisted's I/O Completion Ports (IOCP) reactor and requires Twisted to function.
Agent activity
9 hits · last 30 days
node
8
OpenAI (training)
1
Resources
twisted-iocpsupport — pip install twisted-iocpsupport · libregistry