Skip to content

Conversation

@vdonato
Copy link
Collaborator

@vdonato vdonato commented Apr 6, 2023

📚 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> to st.experimental_connection.

A similar pattern already exists within our config options set via command line flag or
config.toml.

@vdonato vdonato added the security-assessment-completed Security assessment has been completed for PR label Apr 6, 2023
@vdonato vdonato requested a review from kajarenc April 7, 2023 00:18
@vdonato
Copy link
Collaborator Author

vdonato commented Apr 7, 2023

Btw @kajarenc, I think we have the go-ahead on wanting to do this from product, so this is now ready for code review

@vdonato vdonato force-pushed the feature/st.experimental_connection branch from f44239f to 044e1ff Compare April 10, 2023 21:08
@vdonato vdonato force-pushed the vdonato/conn-name-from-env branch from a8a5b7d to 7e24725 Compare April 10, 2023 21:08
literal as the connection_class.
* Plugging your own ConnectionClass into st.experimental_connection.
"""
USE_ENV_PREFIX = "env:"
Copy link
Collaborator

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?

Copy link
Collaborator Author

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

@vdonato vdonato merged commit d4ab23c into feature/st.experimental_connection Apr 11, 2023
@vdonato vdonato deleted the vdonato/conn-name-from-env branch April 11, 2023 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

security-assessment-completed Security assessment has been completed for PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants