A Python library providing high-level async/await APIs for serial port communication, built on pySerial and asyncio.
aioserial is a Python library that provides asynchronous serial port communication using asyncio and pySerial. It solves the problem of blocking I/O in serial communication by offering async/await methods, enabling developers to build responsive applications that interact with hardware devices without freezing. It also fills the gap left by pySerial-asyncio's lack of Windows support.
Python developers working with serial devices in asyncio-based applications, especially those on Windows or those seeking a higher-level API than existing async serial libraries.
Developers choose aioserial for its clean, high-level async API, cross-platform support including Windows, and full compatibility with the widely-used pySerial library, making it a practical upgrade for modern async Python projects.
pyserial-asyncio for humans.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Enables asynchronous serial communication on Windows, addressing a key gap where pySerial-asyncio fails, as highlighted in the README's motivation.
Offers intuitive coroutine methods like read_async() and write_async(), simplifying code compared to pySerial-asyncio's protocol-based approach, as shown in the quick start examples.
Inherits from serial.Serial, ensuring seamless use of all pySerial features and easy migration from synchronous code, confirmed by the API documentation showing subclass relationships.
Includes configurable cancel_read_timeout and cancel_write_timeout parameters, making it robust for async task management, as detailed in the constructor options.
Tightly coupled with Python's asyncio, making it unsuitable for synchronous projects or alternative async frameworks like trio, limiting its versatility.
As a newer library, it has a smaller community and less extensive third-party support compared to pySerial, which could affect troubleshooting and long-term maintenance.
Any bugs or performance issues in the underlying pySerial library are carried over, and aioserial doesn't add significant features beyond async wrappers, as noted in the 'Other APIs' section.