jeremyephron / simplegmail

A simple Gmail API client for applications in Python
MIT License
348 stars 74 forks source link

Authorization via Environment Variables? #49

Open infinity-plus opened 3 years ago

infinity-plus commented 3 years ago

Please add support for authorizing Gmail Object via environmental variables for services like Heroku that recommend using Twelve-Factor App principles, e.g., storing config data in the environment instead of files.

Tylerlhess commented 7 months ago

While trying to figure out a good way to Dockerize a simple cronjob that checks email to import some stats (its a work around for their API giving only root access to the WAF.) I was going to go down a path of trying to store the creds in a DB. oauth2client does have a SQLacademy storage module but implementing that and pushing it through seems harder than just fixing this 3 years after it was requested and using Docker secrets to store the refresh token and credentials.

TL;DR; might submit a pr for this soon.