asyncio-pipe-0.0.1
توضیحات
Non-blocking IPC with Asyncio
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | asyncio-pipe-0.0.1 |
| نام | asyncio-pipe |
| نسخه کتابخانه | 0.0.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Roger Iyengar |
| ایمیل نویسنده | ri@rogeriyengar.com |
| آدرس صفحه اصلی | https://github.com/rogerthat94/asyncio-pipe |
| آدرس اینترنتی | https://pypi.org/project/asyncio-pipe/ |
| مجوز | - |
# 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
```python
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))
```
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6 | Python |
نحوه نصب
نصب پکیج whl asyncio-pipe-0.0.1:
pip install asyncio-pipe-0.0.1.whl
نصب پکیج tar.gz asyncio-pipe-0.0.1:
pip install asyncio-pipe-0.0.1.tar.gz