-
Notifications
You must be signed in to change notification settings - Fork 4k
Allow st.experimental_connection callers to set a name via envvar #6446
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
Allow st.experimental_connection callers to set a name via envvar #6446
Conversation
|
Btw @kajarenc, I think we have the go-ahead on wanting to do this from product, so this is now ready for code review |
f44239f to
044e1ff
Compare
a8a5b7d to
7e24725
Compare
| literal as the connection_class. | ||
| * Plugging your own ConnectionClass into st.experimental_connection. | ||
| """ | ||
| USE_ENV_PREFIX = "env:" |
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.
how does this should correlate with streamlit-specific config options with the STREAMLIT_ prefix?
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.
I don't think there are any explicit interactions we need to design for. In theory, a user could choose to have their connection name set by env:STREAMLIT_*, but I don't see a reason anyone would want to do this since all the config options are for unrelated things
📚 Context
This small feature allows users to be able to set the name of their connection in their
environment variables, then denote which environment variable to get the name from
by passing
env:<NAME_OF_ENVVAR>tost.experimental_connection.A similar pattern already exists within our config options set via command line flag or
config.toml.