Skip to content

Commit

Permalink
Merge pull request #10 from saleweaver/main
Browse files Browse the repository at this point in the history
Fixed installation error
  • Loading branch information
denisneuf authored Nov 12, 2021
2 parents 58590b2 + 55fca99 commit b2a1096
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 17 deletions.
4 changes: 1 addition & 3 deletions ad_api/base/credential_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ def from_env(self):
profile_id=self._get_env('AD_API_PROFILE_ID'),
)
self.credentials = self.Config(**account_data)
missing = self.credentials.check_config()
if not len(missing):
return True
return len(self.credentials.check_config()) == 0

def _get_env(self, key):
return os.environ.get(f'{key}_{self.account}',
Expand Down
2 changes: 1 addition & 1 deletion ad_api/base/marketplaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class Marketplaces(Enum):

def __init__(self, info):
config = dotenv_values(".env")
AWS_ENVIRONMENT = config.get('AWS_ENV') or os.environ.get('API_PASSWORD')
AWS_ENVIRONMENT = os.environ.get('AWS_ENV') or config.get('AWS_ENV') or os.environ.get('API_PASSWORD')
if AWS_ENVIRONMENT == "PRODUCTION":
self.region_url = info.get('prod')
else:
Expand Down
4 changes: 2 additions & 2 deletions requeriments.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
pytest
requests~=2.26.0"
requests~=2.26.0
six>=1.16,<2
cachetools~=4.2.4
setuptools~=58.0.4
pycryptodome~=3.11.0
python-dotenv~=0.19.1
pytz~=2021.3
confuse~=1.6.0
confuse~=1.6.0
12 changes: 1 addition & 11 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = python-amazon-ad-api
version = 0.1.2
version = 0.1.3
author = Daniel Alvaro
author_email = [email protected]
description = Python wrapper for the Amazon Advertising API
Expand All @@ -14,13 +14,3 @@ classifiers =
License :: OSI Approved :: MIT License
Operating System :: OS Independent

[options]
package_dir =
= src
packages = find:
python_requires = >=3.8

install_requires = requests

[options.packages.find]
where = src

0 comments on commit b2a1096

Please sign in to comment.