Running scripts via shell/console but having problems with the secrets

Is there to run 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" to run="run_command_for_lang", though it won’t have an effect for languages with interpreters as shown in the comment on line 1.



Show hidden files


Also see the docs on how to configure a Repl:

Accessing API keys should still be A-Ok!
You can still access the Secret, no matter the file @l09z !

Hope this helps!

1 Like

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