Name | anyio-serial JSON |
Version |
0.3.1
JSON |
| download |
home_page | None |
Summary | Quick and dirty serial bytestreams for anyio |
upload_time | 2024-11-04 04:09:39 |
maintainer | None |
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": null,
"name": "anyio-serial",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6.2",
"maintainer_email": null,
"keywords": null,
"author": "Matthias Urlichs",
"author_email": "matthias@urlichs.de",
"download_url": "https://files.pythonhosted.org/packages/1f/bb/ed5c0c486d947b522c0ec5c11a74083e7db5c28842b6a2ca64761f2a1c0b/anyio_serial-0.3.1.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.1",
"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": "9b060a345db8699d16ea577ce420beff2003d7cb80ec62a1302cad38dfd26ae0",
"md5": "f5ff607662342162f28f63e2698434bd",
"sha256": "721cdb3abc7354fce16a55e2387c4a65565e8f122019936e9bc428f6086b37bb"
},
"downloads": -1,
"filename": "anyio_serial-0.3.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f5ff607662342162f28f63e2698434bd",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6.2",
"size": 4027,
"upload_time": "2024-11-04T04:09:37",
"upload_time_iso_8601": "2024-11-04T04:09:37.603536Z",
"url": "https://files.pythonhosted.org/packages/9b/06/0a345db8699d16ea577ce420beff2003d7cb80ec62a1302cad38dfd26ae0/anyio_serial-0.3.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1fbbed5c0c486d947b522c0ec5c11a74083e7db5c28842b6a2ca64761f2a1c0b",
"md5": "e455aa6e9e3db051471418319d0b8bb6",
"sha256": "3e92c7717ad78c0adb01601ddfc35a3c0ca723ee36b5a0a95ae7b8b436065035"
},
"downloads": -1,
"filename": "anyio_serial-0.3.1.tar.gz",
"has_sig": false,
"md5_digest": "e455aa6e9e3db051471418319d0b8bb6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6.2",
"size": 4066,
"upload_time": "2024-11-04T04:09:39",
"upload_time_iso_8601": "2024-11-04T04:09:39.147614Z",
"url": "https://files.pythonhosted.org/packages/1f/bb/ed5c0c486d947b522c0ec5c11a74083e7db5c28842b6a2ca64761f2a1c0b/anyio_serial-0.3.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-04 04:09:39",
"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"
}