Shiny for Python + Supabase

I've been building a personal app for a while and I have a lot of modules causing this to turn into a large app. I'm at an interesting point where I want to consider storing data, or, if the site is refreshed it stores some of those settings so the data isn't lost and I have to start all over (something locked up, small crashes, etc...).

I've run into things I consider as roadblocks... not sure how to set up environment variables in shinyapps.io for URL and secret key via server side for security. I like shiny and shinyapps.io (basic plan), and have been using the tools for a while, but I'm at an interesting point in "what next and scaling".

Wanted to get some thoughts from the devs / community. Not sure if I need to consider retooling to something else if I have to go with that approach. Shinyapps.io didn't have a lot on the manner that I could track down.

You can use dotenv for secrets e.g.

In the app:

from dotenv import load_dotenv
load_dotenv()
secret =  os.getenv("SECRET")

In .env:

SECRET=your_secret

And for restoring settings, it sounds as if you might want to use bookmarking: ui.input_bookmark_button – Shiny for Python

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.