EnvConfig WidgetThe whole point of this widget is to make it easy to either load required environment variables or to set them from the notebook for tutorials. The widget will automatically try to load any environment variables, but you can also still set them manually and also add a validator.
This way, the user can confirm that all the keys are correct before moving on to the rest of the tutorial. In our experience, this saves a whole lot of time wasted and makes for a nicer developer experience.
You can fetch values from this widget directly.
You can also check if all the inputs are valid. This is useful if you want to prevent other cells from running.
If you want to raise an error when the inputs are invalid, you can use require_valid().