============================
Asyncio wrapper for pyserial
============================
.. 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`.
Installation
============
.. code-block:: sh
pip install asyncserial
Documentation
=============
https://asyncserial.readthedocs.io
Examples
========
.. 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()
Asyncio wrapper for pyserial
============================
.. 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`.
Installation
============
.. code-block:: sh
pip install asyncserial
Documentation
=============
https://asyncserial.readthedocs.io
Examples
========
.. 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()
Metadata
Release files for asyncserial 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| asyncserial-0.1.0.tar.gz | 8.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| asyncserial-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.9 kB
Release files / asyncserial-0.1.0.tar.gz
| Download URL | asyncserial-0.1.0.tar.gz |
|---|---|
| Size | 8.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bc264b1928509565e6629ad2fa40688f8e2a488f3e952ceabf3c089ab8948536
|
|
BLAKE2b-256 checksum How to use checksums |
cbd0adc22ce65d89c4a06dd8594c6b687674f2f969328359f342ae5aab2c9999
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / asyncserial-0.1.0-py3-none-any.whl
| Download URL | asyncserial-0.1.0-py3-none-any.whl |
|---|---|
| Size | 8.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fb2d76878d913753ce122b74cf905e0bd6e94f4a2d956a830b60d9ccb88daf4b
|
|
BLAKE2b-256 checksum How to use checksums |
f36f291e0ee1c53b14d6799210793fa18cd48a7c32e2e05bff3a166fab2b52eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |