Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
.. image:: https://badge.fury.io/py/asyncserial.svg :target: https://badge.fury.io/py/asyncserial :alt: PyPI version
.. image:: https://img.shields.io/pypi/pyversions/asyncserial.svg :target: https://pypi.org/project/asyncserial/ :alt: Python Versions
.. image:: https://readthedocs.org/projects/asyncserial/badge/?version=latest :target: http://asyncserial.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status
asyncserial
is a a wrapper for the pyserial
library providing an async interface based on async def
and await
.
.. code-block:: sh pip install asyncserial
https://asyncserial.readthedocs.io
.. code-block:: python
import asyncio from asyncserial import Serial
loop = asyncio.get_event_loop()
test_serial = Serial(loop, "/dev/ttyACM0", baudrate=115200)
async def test(): await test_serial.read() # Drop anything that was already received while True: line = await test_serial.readline() # Read a line print("[+] Serial read: {}".format(line)) await asyncio.sleep(0) # Let's be a bit greedy, should be adjust to your needs
asyncio.ensure_future(test())
print("[+] Starting eventloop") loop.run_forever()
FAQs
Asyncio wrapper for pyserial
We found that asyncserial demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.