dbrattli / dbrattli/aioreactive

Is there an operator to connect an Observable to an Observer, and if not, which one would you prefer?

Open
#8 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
401
Forks
25
PR merge metrics
No merged PRs in 30d

Description

Hi Dag,

I think the pipe syntax for chaining operators is really cool, and am missing something similar to complete the chain.

That is, I find myself writing code like `xs = source | op.map( f1) | op.map( f2) | ...` and then having to complete it with a clunky

```
async def f():
subscription = await subscribe(xs, AnonymousAsyncObserver(sink_fun))
```

when I'd much rather just say something like

`f = xs > sink_fun`

where the > operator means we're coupling the source with an Observer that can consume it, returning a regular coroutine.

Is there something like that in aioreactive, and if not, do you have any immediate plans to write it?

If the answer to both of the above is 'no' , I'll have a go at writing one this week and would be grateful for any hints :)

Thanks a lot!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.