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

Flask integration #169

Closed chriso closed 5 months ago

chriso commented 5 months ago

Flask is a popular WSGI framework with more downloads than FastAPI (a newer ASGI framework).

This PR adds support for integrating Dispatch with a Flask application:

from flask import Flask
from dispatch.flask import Dispatch

app = Flask(__name__)
dispatch = Dispatch(app)

I used this as an opportunity to factor out common code from the three web integrations we have now.