Skip to main content

A simple library for asynchronous communication with standard I/O.

Project description

aiostd

A simple library for asynchronous communication with standard I/O

The library employs asyncio's I/O multiplexing, which enables efficient I/O operations by monitoring multiple file descriptors simultaneously without the overhead of creating separate threads.

Installation

pip install -U aiostd

Usage

from aiostd import open_io_stream
import sys

async def main():
    reader, writer = await open_io_stream(sys.stdin, sys.stdout)

    async for line in reader:
        writer.write(line)
        await writer.drain()

asyncio.run(main())

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aiostd-0.0.1.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

aiostd-0.0.1-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file aiostd-0.0.1.tar.gz.

File metadata

  • Download URL: aiostd-0.0.1.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.8.18

File hashes

Hashes for aiostd-0.0.1.tar.gz
Algorithm Hash digest
SHA256 3386292c209b2f22f3a9919d11e34685cee74b35d1c36f79fd572c89eac1362b
MD5 ca5f0fe84bddd890e49c6beed926303e
BLAKE2b-256 21244a257afacec66ebf0caad0fb285d3ad16a98e00452e4a71ed5f5d87fea86

See more details on using hashes here.

File details

Details for the file aiostd-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: aiostd-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.8.18

File hashes

Hashes for aiostd-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ca6eaa58f8ac0a1759f5cfe3f99d70447f06f287e3da7d3a5ad5dce5a056a395
MD5 07032e3c2088768d005ea258663d6bb5
BLAKE2b-256 ef0382b2683fac57fb80377ef803769c62142431ee9ab5a376aed07d9ff087c1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page