Ask coding questions

← Back to all posts
Set Environment Variables?
joecooldoo

How would you set env vars inside of python code? The only way I see is that you have to go to the secrets tab and add them. I want to be able to set them within the program.

Voters
joecooldoo
Comments
hotnewtop
SixBeeps

Mmm, what do you plan on achieving with that kind of functionality?

EDIT: Here have this SO post https://stackoverflow.com/questions/5971312/how-to-set-environment-variables-in-python

joecooldoo

@SixBeeps

Mmm, what do you plan on achieving with that kind of functionality?

Maybe like account creation or something

SixBeeps

@joecooldoo No, don't do that with environment variables. Instead, set up a database.