Skip to main content

Non-blocking IPC with Asyncio

Project description

Asyncio Pipe

This package allows you to read from a multiprocessing.Connection object without blocking an asyncio event loop.

The Connection class has the same API functions as multiprocessing.Connection.

Usage

import asyncio
import multiprocessing
import asyncio_pipe

async def reader(read):
    connection = asyncio_pipe.Connection(read)
    print(await connection.recv())

def writer(write):
    write.send('Hello World')

read, write = multiprocessing.Pipe(duplex=False)
writer_process = multiprocessing.Process(target=writer, args=(write,))
writer_process.start()
asyncio.get_event_loop().run_until_complete(reader(read))

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

asyncio-pipe-0.0.1.tar.gz (2.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

asyncio_pipe-0.0.1-py3-none-any.whl (2.2 kB view details)

Uploaded Python 3

File details

Details for the file asyncio-pipe-0.0.1.tar.gz.

File metadata

  • Download URL: asyncio-pipe-0.0.1.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.21.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

File hashes

Hashes for asyncio-pipe-0.0.1.tar.gz
Algorithm Hash digest
SHA256 b82ff35a9aee7d7422e0006c1b852dd9d393ae5ccc5ee7e359d15180930c6b6e
MD5 4272048aeeb38f4ebcf20aad5351c0df
BLAKE2b-256 0f62994b4a6e494f148c2b5699313c707730e266a8d5cbd9eebb77f931202a69

See more details on using hashes here.

File details

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

File metadata

  • Download URL: asyncio_pipe-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.21.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

File hashes

Hashes for asyncio_pipe-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cfe4afded61f318663a28117e2b3e5396dccbc7de174b3fcb60a2a2f9b8d0f53
MD5 1bcb13ff24548782bcb74ff6e321dc23
BLAKE2b-256 a52a56907fc39a5856e3b8f5e765242a7a8b3e52e4ab4e095b9b6d336e69efb7

See more details on using hashes here.

Supported by

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