diff --git a/.gitignore b/.gitignore index 3d0067a..bcb4774 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ __pycache__ .pytest_cache -classes/test.py \ No newline at end of file +classes/test.py +.env \ No newline at end of file diff --git a/classes/auth.py b/classes/auth.py index f72c6a1..75160d5 100644 --- a/classes/auth.py +++ b/classes/auth.py @@ -1,6 +1,11 @@ +# import .env file +from decouple import config + class Auth: """ Authenticate with HubSpot """ def get_token(): # get HubSpot private app token from input - token = input('Enter your HubSpot private app token: ') - return token \ No newline at end of file + # token = input('Enter your HubSpot private app token: ') + # return token from .env file + access_token = config('ACCESS_TOKEN') + return access_token \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 55b033e..478b54a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,2 @@ -pytest \ No newline at end of file +pytest +python-decouple \ No newline at end of file