Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/orf/aio-pipes
Asynchronous pipes in Python
https://github.com/orf/aio-pipes
Last synced: 16 days ago
JSON representation
Asynchronous pipes in Python
- Host: GitHub
- URL: https://github.com/orf/aio-pipes
- Owner: orf
- Created: 2015-08-23T22:17:40.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-01-03T23:02:59.000Z (almost 9 years ago)
- Last Synced: 2024-09-16T16:42:57.393Z (about 2 months ago)
- Language: Python
- Size: 17.6 KB
- Stars: 6
- Watchers: 5
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Asyncio Pipes
[![](https://travis-ci.org/orf/aio-pipes.svg?branch=master)](https://travis-ci.org/orf/aio-pipes)
[![Coverage Status](https://coveralls.io/repos/orf/aio-pipes/badge.svg?branch=master&service=github)](https://coveralls.io/github/orf/aio-pipes?branch=master)This module provides a set of pipe-like data structures for use with asyncio-based applications.
```python
def capitalize(name):
return name.capitalize()
def say_hello(data):
return "Hello {name}".format(name=data)pipe = new Pipeline("My First Pipeline") | capitalize | say_hello
pipe < open("list_of_names.txt")
pipe > sys.stdout
asyncio.run_until_complete(pipe.start())
```## Pipelines
Pipelines are composed of pipes and filters.