dispatchrun / dispatch-py

Python package to develop applications with Dispatch.
https://pypi.org/project/dispatch-py/
Apache License 2.0
56 stars 3 forks source link

support both asyncio and blocking modes with different abstractions #178

Closed achille-roussel closed 4 months ago

achille-roussel commented 4 months ago

Based on #176, this PR is an example of how we could change our internals to support both blocking and asyncio modes.

An important point here is we retain end-to-end type safety via annotations, since mypy is able to differentiate types (e.g., AsyncFunction and BlockingFunction).