dispatchrun / dispatch-py

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

Add top-level dispatch.batch helper function #165

Closed chriso closed 4 months ago

chriso commented 4 months ago

https://github.com/dispatchrun/dispatch-py/pull/154 added a way for users to run Dispatch without an integration like FastAPI. In this mode, the user doesn't have to instantiate a Dispatch (and Registry) instance, and can instead use the top-level functions that have the same behavior.

We were missing a top-level batch function that other integrations have access to on their dispatch (Registry) instances (see Registry.batch). This PR adds the missing function to bring parity with the other integrations.