open-source-ideas / open-source-ideas-twitter-bot

open-source-ideas-twitter-bot https://github.com/open-source-ideas/open-source-ideas/issues/80

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Consider reading credentials from environment variables instead of from file

FredrikAugust opened this issue · comments

As the title says.

This would make it a lot easier when publishing to e.g. heroku, as you can set the env vars there. It would also prevent accidental commits with the credentials inside (this has happened to me several times).

Example:

import os
bot_password = os.environ['OSII_BOT_PASSWORD']