dbrattli / dbrattli/aioreactive

documentation for creating observable streams

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

Description

I've got a functions:

```python
def get_producer():
tool = Tool()

async def start(listener):
def on_event(event):
listener(event)
tool.on_scan_result = on_event
tool.start_scan()
await tool.transport.drain()

async def stop():
tool.stop_scanning()
await tool.transport.drain()

return { "start": start, "stop": stop } # my old api.
return AsyncObservable( # what goes here? )
```

And I'd like to be able to turn it into an observable stream, that automatically starts/stops scanning when the obserables are added/removed but I'm not sure how.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the get_producer example and the AsyncObservable, Tool, start, and stop entry points named in the issue. Determine which existing documentation explains observable lifecycle management, then document how the example should represent subscription and disposal behavior; no documentation file or test is named, so the repository’s current observable examples are the first place to look.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
stream-processing
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.