-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
26 lines (21 loc) · 895 Bytes
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import praw
from dotenv import load_dotenv
from os import environ
from twilio.rest import Client
def reddit_config():
load_dotenv()
reddit_client_id = environ.get('REDDIT_CLIENT_ID')
reddit_client_secret = environ.get('REDDIT_CLIENT_SECRET')
reddit_user_agent = environ.get('REDDIT_USER_AGENT')
reddit_username = environ.get('REDDIT_USERNAME')
reddit_password = environ.get('REDDIT_PASSWORD')
return praw.Reddit(client_id=reddit_client_id,
client_secret=reddit_client_secret,
user_agent=reddit_user_agent,
username=reddit_username,
password=reddit_password)
def twilio_config():
load_dotenv()
twilio_account_sid = environ.get('TWILIO_ACCOUNT_SID')
twilio_auth_token = environ.get('TWILIO_AUTH_TOKEN')
return Client(twilio_account_sid, twilio_auth_token)