Forums

Alternative way to set environment variables

Hi,

I saw in other topics that the most common way to set env variables in PythonAnywhere is using the wsgi.py file.

I want to know if there's another way to do it. This project I'm working on will be open sourced soon (after I discover another way to set the env vars) and the wsgi.py is included in git, including the SECRET_KEY and third party app id and secrets is not a good idea.

Currently I use Fabric to deploy it.

Thank you! :)

Perhaps you could just have a separate webapp_passwords.env file somewhere, and read it and set the env variables within the wsgi.py file. So none of the secrets will be leaked?