Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: use environment variables for the configurations values #3

Closed
idrissneumann opened this issue Dec 13, 2021 · 0 comments
Closed

Comments

@idrissneumann
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant