Forums

.env files, webapps and flask

I don't seem to be able to pull .env variables within a webapp. It works locally and within a script run in bash but if I try and do this within flask on python anywhere it returns none for any value?

Thank you for any insight.

See https://help.pythonanywhere.com/pages/environment-variables-for-web-apps/

Well I feel a bit sheepish that there was a help article on this. Honestly, on standard web servers I always just ran these without additional configuration so I thought it was a me problem.

Thank you for lighting the way.