diff --git a/src/dispatch/fastapi.py b/src/dispatch/fastapi.py new file mode 100644 index 00000000..b90e1e0f --- /dev/null +++ b/src/dispatch/fastapi.py @@ -0,0 +1,10 @@ +"""Integration of Dispatch programmable endpoints for FastAPI. + +""" + +import fastapi + + +def configure(app: fastapi.FastAPI): + """Configure the FastAPI app to use Dispatch programmable endpoints.""" + ... diff --git a/tests/test_fastapi.py b/tests/test_fastapi.py index 8d8aee3c..aaeb8fd2 100644 --- a/tests/test_fastapi.py +++ b/tests/test_fastapi.py @@ -1,13 +1,16 @@ import unittest import dispatch +import dispatch.fastapi import fastapi from fastapi.testclient import TestClient -class TestFastapi(unittest.TestCase): +class TestFastAPI(unittest.TestCase): def test_fastapi(self): app = fastapi.FastAPI() + dispatch.fastapi.configure(app) + @app.get("/") def read_root(): return {"Hello": "World"}