How to get environment variables in python with the new way in repl?
So I have been trying to access environment variables that I have set using the new Secrets feature on the sidebar but I can't seem to retrieve them inside my program. Whenever I am running the program manually by typing python main.py on the shell trying to access the environment variable using os.getenv('YOUTUBE_API_KEY') it returns None. But it works fine on the console. if anyone can help i would be really grateful!! :)
According to the docs, you can't get access environment variables in the shell:
Note that you cannot set environment variables for repls that have only a frontend, e.g. HTML repls. Also note that environment variables set through the UI are not available in the Replit shell (e.g. with echo $MY_VARIABLE).