Name | anyio-serial JSON |
Version |
0.3.2
JSON |
| download |
home_page | None |
Summary | Quick and dirty serial bytestreams for anyio |
upload_time | 2024-12-03 10:18:58 |
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/ec/0a/e6bd8b5ae39038e699f97266abc5a5099e0bb30cb43936bf34b516398250/anyio_serial-0.3.2.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.2",
"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": "50c023b76d1c7c52872ee0a01a3f8948c9de7db20ab3164560029d72529525ca",
"md5": "eca2c824ce06183d08facecbeaff10c6",
"sha256": "702a75b218d0536021beecc3cdecf2bdbb5c962b79af312da96b7919da4b43e2"
},
"downloads": -1,
"filename": "anyio_serial-0.3.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "eca2c824ce06183d08facecbeaff10c6",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6.2",
"size": 4058,
"upload_time": "2024-12-03T10:18:56",
"upload_time_iso_8601": "2024-12-03T10:18:56.920177Z",
"url": "https://files.pythonhosted.org/packages/50/c0/23b76d1c7c52872ee0a01a3f8948c9de7db20ab3164560029d72529525ca/anyio_serial-0.3.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ec0ae6bd8b5ae39038e699f97266abc5a5099e0bb30cb43936bf34b516398250",
"md5": "c0f8df9161ce1e5a1a88d51e7279e6c6",
"sha256": "6ccc24b717dd943d692b0cdf221081ae0d1c5e3cbe2cf456c0bebd54601b7d8e"
},
"downloads": -1,
"filename": "anyio_serial-0.3.2.tar.gz",
"has_sig": false,
"md5_digest": "c0f8df9161ce1e5a1a88d51e7279e6c6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6.2",
"size": 4072,
"upload_time": "2024-12-03T10:18:58",
"upload_time_iso_8601": "2024-12-03T10:18:58.493383Z",
"url": "https://files.pythonhosted.org/packages/ec/0a/e6bd8b5ae39038e699f97266abc5a5099e0bb30cb43936bf34b516398250/anyio_serial-0.3.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-03 10:18:58",
"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"
}