Files
scwrypts/py/lib/twilio/client.py
T

19 lines
444 B
Python
Raw Normal View History

2023-02-21 18:44:27 -07:00
from twilio.rest import Client
from py.lib.scwrypts import getenv
CLIENT = None
def get_client():
global CLIENT # pylint: disable=global-statement
if CLIENT is None:
print('loading client')
CLIENT = Client(
username = getenv('TWILIO__API_KEY'),
password = getenv('TWILIO__API_SECRET'),
account_sid = getenv('TWILIO__ACCOUNT_SID'),
)
return CLIENT