ui.dictionary
I'd like to use Marimo for literate DevOps.
Let's say I want to share a collection of notebooks with my team and let's say we currently don't have a secrets storage.
I'd like to have a bootstrap notebook which would check that the user has an encrypted YAML file with API keys and prompt for missing values.
What's the best way to do that?
My initial idea was to collect a list of missing entries and generate an ui.dictionary based on that but it looks like I can't pass a dictionary as
value
.2 Replies
Your initial idea is on the right track. Here's an example: https://static.marimo.app/static/mo-ui-dictionary-83qy
Notebook code:
Let me know if this works for you?
Oh. That should work, by the looks of it. I was thinking about
map
or something, but I wouldn't come up with something that smart!
I'll test it now, thank you so much!
Yes, it works, that's exactly what I was thinking of, an easy way to validate things!
Didn't realize you can use constructors like that.
This will help me maintain the collection: if I need another secret or constant, I just declare it's required in the bootstrap notebook, and it will give me a form to add it, similar to ansible vault but with less hassle.