Name | anyio-serial JSON |
Version |
0.3.0
JSON |
| download |
home_page | |
Summary | Quick and dirty serial bytestreams for anyio |
upload_time | 2024-02-12 13:37:17 |
maintainer | |
docs_url | None |
author | Matthias Urlichs |
requires_python | >=3.6.2 |
license | MIT |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
============
anyio_serial
============
A small Python wrapper that combines `anyio <https://anyio.readthedocs.io>`_
and `pySerial <https://pypi.org/project/pyserial/>`_.
Implementation detail: This library is using too many short-lived threads.
Yes this should be improved.
Quick start
===========
A simple serial port reader
+++++++++++++++++++++++++++
anyio_serial is a reasonably intuitive mash-up of `pySerial`_ and anyio's
``Stream``::
import anyio
from anyio_serial import Serial
async def main():
async with Serial(port='COM1') as port:
while True:
print((await port.receive()).decode(errors='ignore'), end='', flush=True)
anyio.run(main)
API
===
anyio_serial's interface is really simple::
from anyio_serial import Serial
async with Serial(...) as port: # same options as serial.Serial
...
# use "port" like any other anyio ByteStream
Attributes
++++++++++
The states of the serial status lines ``cd``, ``cts``, ``dsr`` and ``ri``
are supported.
Raw data
{
"_id": null,
"home_page": "",
"name": "anyio-serial",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6.2",
"maintainer_email": "",
"keywords": "",
"author": "Matthias Urlichs",
"author_email": "matthias@urlichs.de",
"download_url": "https://files.pythonhosted.org/packages/54/97/9697731e9513d1d52db2615bb148d36a7aa78b0cf9ae3f16e262ac7c4fa7/anyio_serial-0.3.0.tar.gz",
"platform": null,
"description": "============\nanyio_serial\n============\n\nA small Python wrapper that combines `anyio <https://anyio.readthedocs.io>`_\nand `pySerial <https://pypi.org/project/pyserial/>`_.\n\nImplementation detail: This library is using too many short-lived threads.\nYes this should be improved.\n\nQuick start\n===========\n\nA simple serial port reader\n+++++++++++++++++++++++++++\n\nanyio_serial is a reasonably intuitive mash-up of `pySerial`_ and anyio's\n``Stream``::\n\n import anyio\n from anyio_serial import Serial\n \n async def main():\n async with Serial(port='COM1') as port:\n while True:\n print((await port.receive()).decode(errors='ignore'), end='', flush=True)\n \n anyio.run(main)\n\nAPI\n===\n\nanyio_serial's interface is really simple::\n\n from anyio_serial import Serial\n \n async with Serial(...) as port: # same options as serial.Serial\n ...\n # use \"port\" like any other anyio ByteStream\n\nAttributes\n++++++++++\n\nThe states of the serial status lines ``cd``, ``cts``, ``dsr`` and ``ri``\nare supported.\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Quick and dirty serial bytestreams for anyio",
"version": "0.3.0",
"project_urls": {
"Issue tracker": "https://github.com/M-o-a-T/anyio_serial/issues",
"Source code": "https://github.com/M-o-a-T/anyio_serial.git"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "59e03610f20572e2ece4e01e6665ebc03746b1899730e44caa0addbddc165e3b",
"md5": "b9eaa6b81695fc08ef1b028a3eaf012f",
"sha256": "bab5d7d66bf750f08589db469e7b8fad373c1b8a8c1836063e3c0d195549516b"
},
"downloads": -1,
"filename": "anyio_serial-0.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b9eaa6b81695fc08ef1b028a3eaf012f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6.2",
"size": 4033,
"upload_time": "2024-02-12T13:37:16",
"upload_time_iso_8601": "2024-02-12T13:37:16.264709Z",
"url": "https://files.pythonhosted.org/packages/59/e0/3610f20572e2ece4e01e6665ebc03746b1899730e44caa0addbddc165e3b/anyio_serial-0.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "54979697731e9513d1d52db2615bb148d36a7aa78b0cf9ae3f16e262ac7c4fa7",
"md5": "3ec99820c1c4a328c681d41057be4034",
"sha256": "476ad17c3041345acfcb70cc49a3ba50471525fc6571a7c20c4e52fc7123d67b"
},
"downloads": -1,
"filename": "anyio_serial-0.3.0.tar.gz",
"has_sig": false,
"md5_digest": "3ec99820c1c4a328c681d41057be4034",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6.2",
"size": 4047,
"upload_time": "2024-02-12T13:37:17",
"upload_time_iso_8601": "2024-02-12T13:37:17.900862Z",
"url": "https://files.pythonhosted.org/packages/54/97/9697731e9513d1d52db2615bb148d36a7aa78b0cf9ae3f16e262ac7c4fa7/anyio_serial-0.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-12 13:37:17",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "M-o-a-T",
"github_project": "anyio_serial",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "anyio-serial"
}