Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More links and details in the doc. #50

Merged
merged 2 commits into from
Dec 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion aiostream/stream/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ async def just(value):

@operator
async def call(func, *args, **kwargs):
"""Call the given and generate a single value.
"""Call the given function and generate a single value.

Await if the provided function is asynchronous.
"""
Expand Down
12 changes: 9 additions & 3 deletions docs/operators.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,24 @@ Stream operators

.. module:: aiostream.stream

The stream operators are separated in 7 categories:
The stream operators produce objects of
the `Stream <core.html#stream-base-class>`_ class.

They are separated in 7 categories:

.. include:: table.rst.inc

They can be found in the :mod:`aiostream.stream` module.

Custom stream operators can be created using the `@operator <core.html#operator-decorator>`_ decorator.


Pipe-lining
-----------

Most of the operators have a :meth:`pipe` method corresponding to their equivalent pipe operator.
They are also gathered and accessible through the :mod:`aiostream.pipe` module.
The pipe operators allow a 2-step instanciation.
The pipe operators allow a 2-step instantiation.

For instance, the following stream::

Expand All @@ -28,7 +34,7 @@ and can be written as::

ys = xs | pipe.map(lambda x: x**2)

This synthax comes in handy when several operators are chained::
This syntax comes in handy when several operators are chained::

ys = (xs
| pipe.operator1(*args1)
Expand Down
4 changes: 2 additions & 2 deletions docs/presentation.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Presentation
============

aiostream_ provides a collection of stream operators that can be combined to create
aiostream_ provides a collection of `stream operators <operators.html>`_ that can be combined to create
asynchronous pipelines of operations.

It can be seen as an asynchronous version of itertools_, although some aspects are slightly different.
Essentially, all the provided operators return a unified interface called a stream.
Essentially, all the provided operators return a unified interface called a `stream <core.html#stream-base-class>`_.
A stream is an enhanced asynchronous iterable providing the following features:

- **Operator pipe-lining** - using pipe symbol ``|``
Expand Down