Skip to main content

Ruff IDIM

Winloop

PyPI version PyPI - Downloads License: MIT License: Apache-2.0

An alternative library for uvloop compatibility with Windows because let's face it. Windows' Python asyncio standard library is garbage, especially when Windows Defender decides to eat half of your RAM. I never really liked the fact that I couldn't make anything run faster especially when you have fiber internet connections in place and you've done all the optimizations you could possibly think of. It always felt disappointing when libuv is available for Windows but Windows was never compatible with uvloop.

Since nobody was willing to step in after so many years of waiting, I went ahead and downloaded the source code for uvloop and started modifying the source code to be Windows compatible by carefully removing and changing parts that were not made for Windows. Many hours of research went into making this library.

The differences with uvloop is that forking has been fully disabled and some smaller API calls had to be changed, error handling has been carefully modified and subprocesses release the GIL instead of forking out...

There is a performance increase of about 5 times with Winloop compared to using the WindowsSelectorEventLoopPolicy and WindowsProactorEventLoopPolicy which have been known to trigger SSL problems in Python 3.9. Winloop is a very good replacement for solving those SSL problems as well. This library also has comparable performance to its brother uvloop.

How to install Winloop on your Windows Operating System

pip install winloop

You can also clone the repository and build the extension yourself by running the command below if you wish to use or build this library locally. Note that you will need Cython and The Visual C++ extensions to compile this library on your own.

python setup.py build_ext --inplace

To link against a libuv you already have (for example from a package manager) instead of the bundled copy, pass --use-system-libuv. The build asks the linker for uv by name, so its headers and library must be on the compiler's include and linker search paths. The option is on by default under MinGW. It has no effect on non-MinGW Windows builds, which always compile the bundled libuv:

python setup.py build_ext --use-system-libuv --inplace

On Windows with MSVC, INCLUDE and LIB must point at libuv's include and lib directories. The result links uv.lib and needs uv.dll at run time. Python 3.8 and later ignore PATH when loading an extension's dependencies, so call os.add_dll_directory on the libuv bin directory before importing winloop, or copy uv.dll beside the extension.

Testing with UV

The uv package manager is the preferred method for testing winloop and it's author uses ruff and uv by default.

uv venv
uv pip install winloop

If your bilding and testing it from your own fork the following should work.

uv pip install -e .

If your planning to setup.py build_ext commands you will need to install setuptools and cython

uv pip install cython setuptools

Reporting issues

If you find any bugs with this library be sure to open up an issue in the issuetracker. The Winloop Contributors and the Owner when available will be happy try to help you figure out and diagnose your problems.

How To Use Winloop When Uvloop is not available

# Here's A small Example of using winloop when uvloop is not available to us
import sys
import aiohttp

async def main():
    async with aiohttp.ClientSession("https://httpbin.org") as client:
        async with client.get("/ip") as resp:
            print(await resp.json())

if __name__ == "__main__":
    if sys.platform in ('win32', 'cygwin', 'cli'):
        from winloop import run
    else:
        # if we're on apple or linux do this instead
        from uvloop import run
    run(main())

Alternatively, There's another way to do this involving a smaller resource called winuvloop which combines both uvloop and winloop together.

import aiohttp
import winuvloop

async def main():
    async with aiohttp.ClientSession("https://httpbin.org") as client:
        async with client.get("/ip") as resp:
            print(await resp.json())

if __name__ == "__main__":
    winuvloop.run(main())

Videos

Contributing

I put my heart and soul into this library ever since it began and any help is appreciated and means a lot to me, I have other things I wish to explore so every little bit helps. No matter what I go through in life, my heart is always here.

How Can I contribute?

  • Forking the library.
  • Mirroring Winloop's improvements on uvloop's side.
  • Reviewing pull requests.
  • Fixing or editing workflows.
  • Finding and editing spelling mistakes.

Metadata

Release files for winloop 0.8.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for winloop 0.8.4
File Size Uploaded Provenance Actions
winloop-0.8.4.tar.gz 2.9 MB Without provenance Details for winloop-0.8.4.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for winloop 0.8.4
File Actions
winloop-0.8.4-cp315-cp315t-win_arm64.whl CPython 3.15 CPython 3.15 free-threading Windows ARM64 Details for winloop-0.8.4-cp315-cp315t-win_arm64.whl
winloop-0.8.4-cp315-cp315t-win_amd64.whl CPython 3.15 CPython 3.15 free-threading Windows x86-64 Details for winloop-0.8.4-cp315-cp315t-win_amd64.whl
winloop-0.8.4-cp315-cp315-win_arm64.whl CPython 3.15 CPython 3.15 Windows ARM64 Details for winloop-0.8.4-cp315-cp315-win_arm64.whl
winloop-0.8.4-cp315-cp315-win_amd64.whl CPython 3.15 CPython 3.15 Windows x86-64 Details for winloop-0.8.4-cp315-cp315-win_amd64.whl
winloop-0.8.4-cp314-cp314t-win_arm64.whl CPython 3.14 CPython 3.14 free-threading Windows ARM64 Details for winloop-0.8.4-cp314-cp314t-win_arm64.whl
winloop-0.8.4-cp314-cp314t-win_amd64.whl CPython 3.14 CPython 3.14 free-threading Windows x86-64 Details for winloop-0.8.4-cp314-cp314t-win_amd64.whl
winloop-0.8.4-cp314-cp314-win_arm64.whl CPython 3.14 CPython 3.14 Windows ARM64 Details for winloop-0.8.4-cp314-cp314-win_arm64.whl
winloop-0.8.4-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details for winloop-0.8.4-cp314-cp314-win_amd64.whl
winloop-0.8.4-cp313-cp313-win_arm64.whl CPython 3.13 CPython 3.13 Windows ARM64 Details for winloop-0.8.4-cp313-cp313-win_arm64.whl
winloop-0.8.4-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details for winloop-0.8.4-cp313-cp313-win_amd64.whl
winloop-0.8.4-cp312-cp312-win_arm64.whl CPython 3.12 CPython 3.12 Windows ARM64 Details for winloop-0.8.4-cp312-cp312-win_arm64.whl
winloop-0.8.4-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for winloop-0.8.4-cp312-cp312-win_amd64.whl
winloop-0.8.4-cp311-cp311-win_arm64.whl CPython 3.11 CPython 3.11 Windows ARM64 Details for winloop-0.8.4-cp311-cp311-win_arm64.whl
winloop-0.8.4-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details for winloop-0.8.4-cp311-cp311-win_amd64.whl
winloop-0.8.4-cp310-cp310-win_arm64.whl CPython 3.10 CPython 3.10 Windows ARM64 Details for winloop-0.8.4-cp310-cp310-win_arm64.whl
winloop-0.8.4-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details for winloop-0.8.4-cp310-cp310-win_amd64.whl
winloop-0.8.4-cp39-cp39-win_arm64.whl CPython 3.9 CPython 3.9 Windows ARM64 Details for winloop-0.8.4-cp39-cp39-win_arm64.whl
winloop-0.8.4-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details for winloop-0.8.4-cp39-cp39-win_amd64.whl

Total release size: 15.3 MB

Release files / winloop-0.8.4.tar.gz

Download URL winloop-0.8.4.tar.gz
Size 2.9 MB
Tags Source
SHA-256 checksum
How to use checksums
16687656426839b025ac4d36d1167ea81340dfccb56ca27d504fb7916d6fedbb
BLAKE2b-256 checksum
How to use checksums
0fce4479876d0fd97920ac682c9d5596130a3033741e3efcdf400dbc2ec375e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / winloop-0.8.4-cp315-cp315t-win_arm64.whl

Download URL winloop-0.8.4-cp315-cp315t-win_arm64.whl
Size 687.2 kB
Tags CPython 3.15 CPython 3.15 free-threading Windows ARM64
SHA-256 checksum
How to use checksums
cfd35ba459d540d68d38f001cf3f3cccbf9cad503793ecd7b35990d8780f1c14
BLAKE2b-256 checksum
How to use checksums
8251a26151c75041aba30fded4237a40ba94ff85edaff50483ca5c41e5ec6700
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / winloop-0.8.4-cp315-cp315t-win_amd64.whl

Download URL winloop-0.8.4-cp315-cp315t-win_amd64.whl
Size 793.7 kB
Tags CPython 3.15 CPython 3.15 free-threading Windows x86-64
SHA-256 checksum
How to use checksums
6b384746c93e2971120fd3f0d2cfbb38cc6b26d1273f5aaa13edf613b0042294
BLAKE2b-256 checksum
How to use checksums
ab68618bdc7998ed4d78a6ef763122aa8389b3c27e42b1357af650301a3cb31d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / winloop-0.8.4-cp315-cp315-win_arm64.whl

Download URL winloop-0.8.4-cp315-cp315-win_arm64.whl
Size 639.7 kB
Tags CPython 3.15 Windows ARM64
SHA-256 checksum
How to use checksums
5ed64bd7a817159861259119023903b21bce1a818ab8df1d6d8d6721e83512b7
BLAKE2b-256 checksum
How to use checksums
6c0fe0220006b646ebd4be7a4a686222ab431ebd886e88e018209b981d7399bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / winloop-0.8.4-cp315-cp315-win_amd64.whl

Download URL winloop-0.8.4-cp315-cp315-win_amd64.whl
Size 735.6 kB
Tags CPython 3.15 Windows x86-64
SHA-256 checksum
How to use checksums
3e80e3ef964b3e4b603a8aa36ac6cd535a4a5b52be03585e2cb11b8fced851fa
BLAKE2b-256 checksum
How to use checksums
d7839b6362b808fc6151020ac873effa27019431f8220646eb8fbe59d3daeff2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / winloop-0.8.4-cp314-cp314t-win_arm64.whl

Download URL winloop-0.8.4-cp314-cp314t-win_arm64.whl
Size 688.2 kB
Tags CPython 3.14 CPython 3.14 free-threading Windows ARM64
SHA-256 checksum
How to use checksums
b841e268c10924206eba5c6426f938af33d19c9a49ca81078cbb536faa69d835
BLAKE2b-256 checksum
How to use checksums
e670282d0693d39648acf57ebc2a998173e179d88331ba9026edda61ef07bb6e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / winloop-0.8.4-cp314-cp314t-win_amd64.whl

Download URL winloop-0.8.4-cp314-cp314t-win_amd64.whl
Size 799.0 kB
Tags CPython 3.14 CPython 3.14 free-threading Windows x86-64
SHA-256 checksum
How to use checksums
5f069bc5f94a4d8a6b0f75882bde3eb4f5dc6805384bc87bc512c7ab50e6a012
BLAKE2b-256 checksum
How to use checksums
c2740275dd33ca92a82108abf9a563d1a0f14d9865c1d401970d0cbcef871aae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / winloop-0.8.4-cp314-cp314-win_arm64.whl

Download URL winloop-0.8.4-cp314-cp314-win_arm64.whl
Size 639.4 kB
Tags CPython 3.14 Windows ARM64
SHA-256 checksum
How to use checksums
b84852007ec826e12e25af7a6f079aab414e4f1060f0097b0f20ceb18789bcbc
BLAKE2b-256 checksum
How to use checksums
c4514c375115371d4ea791dae7a3d288c5e052f6315d4f889f0e8d3f85278d80
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / winloop-0.8.4-cp314-cp314-win_amd64.whl

Download URL winloop-0.8.4-cp314-cp314-win_amd64.whl
Size 736.2 kB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
83e5bd6d4d7133d0ceee6e7356b4115adc756923dfaba7e66a305d51de724cbb
BLAKE2b-256 checksum
How to use checksums
ee38ea8b9973f2fd96b31311688d4a8d4704cebcaa47b8a1960d2315ca3e87dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / winloop-0.8.4-cp313-cp313-win_arm64.whl

Download URL winloop-0.8.4-cp313-cp313-win_arm64.whl
Size 621.4 kB
Tags CPython 3.13 Windows ARM64
SHA-256 checksum
How to use checksums
524e280779fe57c3612b4e0dfdcfd6376938c0cdb0ac429b4cb9928ae502c5de
BLAKE2b-256 checksum
How to use checksums
5678751bdacaf89c2361986099f0d140978f5b7a3b7bc87f3985b5e44d310017
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / winloop-0.8.4-cp313-cp313-win_amd64.whl

Download URL winloop-0.8.4-cp313-cp313-win_amd64.whl
Size 729.6 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
1d83f606225bc7fb5931633a99e24bdea0fc4246dfae9e1ffa0dac58fefd767b
BLAKE2b-256 checksum
How to use checksums
25f2b66ff68b533b633a93cfe707cd98dfaa761dfb560898dcc770f616e5d668
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / winloop-0.8.4-cp312-cp312-win_arm64.whl

Download URL winloop-0.8.4-cp312-cp312-win_arm64.whl
Size 622.6 kB
Tags CPython 3.12 Windows ARM64
SHA-256 checksum
How to use checksums
60bc7e8515d381a07ea198f320dd1c7c0068777428094d7c24dc1fe729c49f5b
BLAKE2b-256 checksum
How to use checksums
4fa1abc06960b59edc590a68cc58c3bcc7756495bc4eff9a08606e3f42904494
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / winloop-0.8.4-cp312-cp312-win_amd64.whl

Download URL winloop-0.8.4-cp312-cp312-win_amd64.whl
Size 730.6 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
ea8c3251d3ae9650bfaa158ef0df03400aa823f1c87100a478e2b1c7da629009
BLAKE2b-256 checksum
How to use checksums
3fa90cbab21a9b397894da7d7717cbeed9e0778c6a68ea451497cec3d9407c1f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / winloop-0.8.4-cp311-cp311-win_arm64.whl

Download URL winloop-0.8.4-cp311-cp311-win_arm64.whl
Size 625.7 kB
Tags CPython 3.11 Windows ARM64
SHA-256 checksum
How to use checksums
ab3e113773a943cbafd0d8a1ad1cab06a7fa6c79f7c36f67326ea6425add6d7a
BLAKE2b-256 checksum
How to use checksums
1cbe0f80bf677e79e88ed1d704baaaf8a8854a33a2969c036326281a8eee80b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / winloop-0.8.4-cp311-cp311-win_amd64.whl

Download URL winloop-0.8.4-cp311-cp311-win_amd64.whl
Size 709.2 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
b04d6b2677cb20c1dd3919cf7c7071233e38fe029cfed5466ba7050ce406983d
BLAKE2b-256 checksum
How to use checksums
ffd3f2fcb61511800ac89c720134f9194be1ea2dd77be5c00a721df2e52d7bf3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / winloop-0.8.4-cp310-cp310-win_arm64.whl

Download URL winloop-0.8.4-cp310-cp310-win_arm64.whl
Size 621.8 kB
Tags CPython 3.10 Windows ARM64
SHA-256 checksum
How to use checksums
311d0a18a28d43a37d97455d6e3bd0d34cf8bcc3453ddf6d8c47a6c78acea631
BLAKE2b-256 checksum
How to use checksums
3e7d6af0b36a8db4657f8329093c3066c297ee16e7a52ac74d8f8eb74dfa97a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / winloop-0.8.4-cp310-cp310-win_amd64.whl

Download URL winloop-0.8.4-cp310-cp310-win_amd64.whl
Size 701.2 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
e5cd893e51023db1065a22558031e736ffe8b2dc0ea86ddb6a86c68b3db0315f
BLAKE2b-256 checksum
How to use checksums
5927331891e1f20d991fc150e05f0ed171111589795fae6b4eea8a0997f33e0c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / winloop-0.8.4-cp39-cp39-win_arm64.whl

Download URL winloop-0.8.4-cp39-cp39-win_arm64.whl
Size 622.5 kB
Tags CPython 3.9 Windows ARM64
SHA-256 checksum
How to use checksums
0aeda0d0afbb97c90b4b3bc6d9a75b4d99ff9493e0a0b924f89ba6defe247871
BLAKE2b-256 checksum
How to use checksums
46faa936e562fbcf671d93cfaa51cc1de0089c4934b2129ac3cce09c014bdcad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / winloop-0.8.4-cp39-cp39-win_amd64.whl

Download URL winloop-0.8.4-cp39-cp39-win_amd64.whl
Size 693.5 kB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
57f37f2619534096db9806baee99658003ce027300b4aebc56d009893c05d7c2
BLAKE2b-256 checksum
How to use checksums
05e0771e34696228bf3880624ef05391b8d41a9695ca4167442a9b04835d1521
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for winloop 0.8.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.8.4 This release

19 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page