https://github.com/orf/aio-pipes
Asynchronous pipes in Python
https://github.com/orf/aio-pipes
Last synced: 4 months 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 (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-01-03T23:02:59.000Z (over 9 years ago)
- Last Synced: 2025-03-14T21:09:10.633Z (4 months ago)
- Language: Python
- Size: 17.6 KB
- Stars: 6
- Watchers: 4
- 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)
[](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.