MathisHammel/Tweetmetric

Suggestion: use environment variables for the configurations values

Closed this issue · 0 comments

The following values in the api_secrets.py file:

API_KEY = 'YOUR TOKEN HERE'
API_KEY_SECRET = 'YOUR TOKEN HERE'
BEARER_TOKEN = 'YOUR TOKEN HERE'
USER_ACCESS_TOKEN = 'YOUR TOKEN HERE'
USER_ACCESS_TOKEN_SECRET = 'YOUR TOKEN HERE'

should be replaced by environments variables (with the module os), pretty easy, you can replace your code as follow:

import os

API_KEY=os.environ['API_KEY']
// ...

As for the #2 issue, it will make the dockerization easier. At the end, you'll be able to provide an immutable OCI image with all the dependancies already built and ready to run inside. The users'll just have to export the environment variables (or create a .env file for their docker-compose) before running the container.