Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API #4

Open
pmeier opened this issue Apr 25, 2024 · 0 comments
Open

API #4

pmeier opened this issue Apr 25, 2024 · 0 comments

Comments

@pmeier
Copy link
Collaborator

pmeier commented Apr 25, 2024

I think for the first release we should aim for two things:

  1. def bokeh_fastapi.add_bokeh_apps(app: FastApi, bokeh_apps: dict[str, typing.Any]) -> None similar to what we have in

    def add_application_routes(server, apps, prefix="/"):

    This makes it easy to integrate into an existing FastAPI server.

  2. def bokeh_fastapi.serve(apps: dict[str, typing.Any]) -> None which is basically

    def bokeh_fastapi.serve(apps: dict[str, typing.Any]) -> None:
        import uvicorn
        app = FastAPI()
        add_bokeh_apps(app, apps)
        uvicorn.run(app)

We could also wrap 2. into a CLI command, i.e. bokeh-fastapi serve.

Thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant