-
Notifications
You must be signed in to change notification settings - Fork 4k
Add experimental ASGI app entry point for advanced server configuration #13537
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
Conversation
|
@cursor review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ Bugbot reviewed your changes and found no bugs!
SummaryThis PR introduces the experimental
Code QualityThe code quality is excellent.
Test CoverageTest coverage is robust:
Backwards CompatibilityThe changes are backwards compatible:
Security & Risk
Recommendations
VerdictAPPROVED: The PR implements a significant new feature with high code quality, strong test coverage, and careful attention to existing patterns and security requirements. |
|
Nice work @lukasmasuch |
Describe your changes
Add a new experimental
Appclass that provides an ASGI-compatible entry point for Streamlit apps. This enables custom HTTP routes, middleware configuration, lifecycle hooks, and integration with popular Python web frameworks, aligning Streamlit with the broader async web ecosystem. See the spec for more details: #13449The
Appinstance is exposed viafrom streamlit.starlette import Appbut will likely be moved into thestnamespace once we move this out of experimental.This PR also includes the discovery logic for detecting if the main script contains an App call -> which triggers a special asgi execution mode.
GitHub Issue Link (if applicable)
st.App- ASGI application entry point #13449get_tornado_instanceas an experimental API #8661Testing Plan
Contribution License Agreement
By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.