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

Add docs for mounting Mesop app #892

Merged
merged 1 commit into from
Aug 29, 2024
Merged

Conversation

wwwillchen
Copy link
Collaborator

@wwwillchen wwwillchen commented Aug 29, 2024

The FastAPI example seems to be working well:
https://github.com/wwwillchen/mesop-fastapi

However, I'm having trouble with the Flask example: https://github.com/wwwillchen/mesop-flask - when I try to run Mesop in debug mode, it's not loading.

All things considered though, I think encouraging people to use FastAPI is better as it reduces the likelihood of a version dependency conflict with Mesop's internal Flask usage and other people's Flask usage.

Fixes #803.

Copy link
Collaborator

@richard-to richard-to left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. This is exciting. It could be good to provide examples of how one could interact with Fast API in your example repo.

Also could be good to know what limitations there are at the moment.

@wwwillchen
Copy link
Collaborator Author

Nice. This is exciting. It could be good to provide examples of how one could interact with Fast API in your example repo.

I updated the readme to be clearer about this - there's an HTTP interaction w/ web component, let me know if you're thinking of something else.

Also could be good to know what limitations there are at the moment.

good idea, added one around hot reloading.

@wwwillchen wwwillchen merged commit 183450d into google:main Aug 29, 2024
5 checks passed
@richard-to
Copy link
Collaborator

I updated the readme to be clearer about this - there's an HTTP interaction w/ web component, let me know if you're thinking of something else.

Ah, yeah I totally missed that (didn't end up looking at web_component.js).

I guess I was wondering if there was a way to access state from Fast API. One use case I was thinking about was the download use case, where we have some data in state that needs to be included in the download.

It's not a huge deal if we can't access state from from FastAPI. We'd just have to use the web component as a proxy to send certain state info to Fast API.

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

Successfully merging this pull request may close these issues.

Support mounting Mesop with other Python servers
2 participants