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

mount jupyverse in fastapi app #429

Open
HaoXuAI opened this issue Aug 7, 2024 · 1 comment
Open

mount jupyverse in fastapi app #429

HaoXuAI opened this issue Aug 7, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@HaoXuAI
Copy link

HaoXuAI commented Aug 7, 2024

Problem

Is there a way to mount jupyvers APIs into another fastapi app?
e.g,
I have something like:

app = FastAPI()

And I started the server with gunicorn server:app..., is there a way to just mount all jupyverse in the app without starting it with the asphalt?

Proposed Solution

the current way I'm doing is:

# Create the app.
app = App()
jupyverse_app = App(app.api, "jupyverse")

frontend_config = FrontendConfig()
auth_config = _AuthConfig()

auth = auth_factory(jupyverse_app, auth_config, frontend_config)

But feels like too hacking.

Additional context

@HaoXuAI HaoXuAI added the enhancement New feature or request label Aug 7, 2024
@davidbrochart
Copy link
Collaborator

I don't think it's possible, but since you're also using FastAPI you could register your handlers using asphalt-web.

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

No branches or pull requests

2 participants