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

Dispatch without FastAPI #154

Closed achille-roussel closed 5 months ago

achille-roussel commented 5 months ago

This PR relates to https://github.com/stealthrocket/dispatch/pull/12 and https://github.com/stealthrocket/dispatch/pull/19, and is intended to make FastAPI an optional dependency for Dispatch.

I first went down the path of using the gRPC service as a replacement; however, requiring HTTP/2 made a few things difficult since the CLI will attempt HTTP/1 requests (because the connectrpc protocol allows it); see dispatch.grpc.

Rather than hacking something with fake certs and whatnot, I added another implementation using http.server, which is very similar to the one with FastAPI but integrates with the standard library only; see dispatch.http.

This is still work in progress, I need to add tests.

vadimdemedes commented 5 months ago

This will be great for onboarding 👍