-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Return access token from .env instead of user input
- Loading branch information
Bruno
committed
Oct 28, 2023
1 parent
b36e612
commit 774308b
Showing
3 changed files
with
11 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
__pycache__ | ||
.pytest_cache | ||
classes/test.py | ||
classes/test.py | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
# token = input('Enter your HubSpot private app token: ') | ||
# return token from .env file | ||
access_token = config('ACCESS_TOKEN') | ||
return access_token |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
pytest | ||
pytest | ||
python-decouple |