winuvloop is a Python package that automatically installs and configures the optimal event loop for your platform, setting up uvloop on Linux/POSIX systems and winloop on Windows, ensuring seamless cross-platform development.
Project description
winuvloop
winuvloop
is a Python package that ensures you always use the best event loop for your platform.
It automatically sets up uvloop
on Linux/POSIX systems and winloop
on Windows, optimizing performance and compatibility without extra configuration.
By using winuvloop
, you can streamline your development process and focus on writing your application code, knowing that the right event loop is always in place for seamless cross-platform functionality.
Features
- Cross-Platform Compatibility: Automatically installs
uvloop
on POSIX systems andwinloop
on Windows. - Easy Integration: Just add
winuvloop
to yourpyproject.toml
orrequirements.txt
and let it handle the rest. - Simplified Event Loop Setup: No need to worry about platform-specific event loop installation and initialization.
Installation
You can install winuvloop
via pip:
pip install winuvloop
Or by adding it to your pyproject.toml
in a Poetry-managed project:
poetry add winuvloop
Usage
Simply import the package, and use it as you would uv/win loop:
import winuvloop
# the preferred way to use win/uv loop is with the run method
uvwinloop.run(my_coroutine)
alternatively, you can install the loop globally:
import winuvloop
# The correct event loop is now installed and ready to use.
winuvloop.install()
Requirements
- Python 3.11 or higher
uvloop
for POSIX systemswinloop
for Windows systems
Platform Support
- POSIX (Linux, macOS): Installs
uvloop
- Windows: Installs
winloop
License
This project is licensed under the MIT License. See the LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request or open an issue.
Contact
For any questions or suggestions, please contact aviadr1@gmail.com
.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for winuvloop-0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 19820145d293debe8a059e88b4688dc1fd5913afa3f2987b7e788713a4baf4ce |
|
MD5 | 90c6bb9b35d0502850d756cd8ac0a603 |
|
BLAKE2b-256 | c9700f145a8e34231ca8da090014cfd3dba5564d644f6b8910c5f5521a6c81ec |