Adding in .env loading of credentials

This commit is contained in:
Lucas Oskorep
2020-05-06 13:16:00 -05:00
parent fca9d9efa2
commit 714f960215
2 changed files with 14 additions and 7 deletions
+2 -2
View File
@@ -7,8 +7,8 @@ from dotenv import load_dotenv
load_dotenv() load_dotenv()
consumer_key = os.getenv('CKEY', '0') consumer_key = os.getenv('APIKEY', '0')
consumer_secret = os.getenv('CSECRET', '0') consumer_secret = os.getenv('APISECRET', '0')
access_token = os.getenv('ATOKEN', '0') access_token = os.getenv('ATOKEN', '0')
access_token_secret = os.getenv('ASECRET', '0') access_token_secret = os.getenv('ASECRET', '0')
+12 -5
View File
@@ -1,5 +1,12 @@
# Variables that contains the user credentials to access Twitter API # Variables that contains the user credentials to access Twitter API
ACCESS_TOKEN = "" import os
ACCESS_TOKEN_SECRET = ""
CONSUMER_KEY = "" from dotenv import load_dotenv
CONSUMER_SECRET = ""
load_dotenv()
ACCESS_TOKEN = os.getenv('ATOKEN', '0')
ACCESS_TOKEN_SECRET = os.getenv('ASECRET', '0')
CONSUMER_KEY = os.getenv('APIKEY', '0')
CONSUMER_SECRET = os.getenv('APISECRET', '0')