Is there to run non-main.py scripts via the shell/console but still get the api keys stored in the secrets, I am facing an error on the below code.
api_key = os.environ['api_key']
Is there to run non-main.py scripts via the shell/console but still get the api keys stored in the secrets, I am facing an error on the below code.
api_key = os.environ['api_key']
Hey @l09z!
Just click the ⋮ next to “Files” then click “Show hidden files”. Next click on the .replit
file and finally you can change the entrypoint
to whatever file you want to run.
You can also change the second line from run="run_command_for_lang main.py"
to run="run_command_for_lang fileIWantToRun.py"
, though it won’t have an effect for languages with interpreters as shown in the comment on line 1.
Also see the docs on how to configure a Repl: https://docs.replit.com/programming-ide/configuring-repl
Accessing API keys should still be A-Ok!
You can still access the Secret, no matter the file @l09z !
Hope this helps!
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.