Skip to main content

anyio_serial

A small Python wrapper that combines anyio and 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.

Metadata

Release files for anyio-serial 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for anyio-serial 0.2.1
File Size Uploaded Provenance
anyio_serial-0.2.1.tar.gz 4.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for anyio-serial 0.2.1
File Interpreter ABI Platform
anyio_serial-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 8.1 kB

Release files / anyio_serial-0.2.1.tar.gz

Download URL anyio_serial-0.2.1.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
e55ab1e00d35076bd901021a7a3eacb4267d6c3606b31996f54e8cf039fb8003
BLAKE2b-256 checksum
How to use checksums
a8ce7d6e2fb5b51ee39d2502bc158265cb243a206d92dfcb50031f7232929faf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.8.2 requests/2.25.1 setuptools/65.5.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.10.9

Release files / anyio_serial-0.2.1-py3-none-any.whl

Download URL anyio_serial-0.2.1-py3-none-any.whl
Size 4.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a5c3dbb8096463678930e7709ad194536e7849cd0f561b55bb04fc9a44c5329c
BLAKE2b-256 checksum
How to use checksums
dca0b0eb56b53a63b82900173de9af6822a51810d222191571e3bd7e4b81c9f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.8.2 requests/2.25.1 setuptools/65.5.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.10.9

Security for anyio-serial 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page