Skip to content

Commit 933f6bb

Browse files
committed
add async support to creators api
1 parent 07be5e9 commit 933f6bb

11 files changed

Lines changed: 2846 additions & 2 deletions

File tree

amazon_creatorsapi/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,17 @@
33
A Python wrapper for the Amazon Creators API.
44
"""
55

6+
from importlib.util import find_spec
7+
68
__author__ = "Sergio Abad"
79
__all__ = ["AmazonCreatorsApi", "Country", "models"]
810

911
from . import models
1012
from .api import AmazonCreatorsApi
1113
from .core import Country
14+
15+
# Async support (requires 'async' extra: pip install python-amazon-paapi[async])
16+
if find_spec("httpx") is not None:
17+
from .async_api import AsyncAmazonCreatorsApi
18+
19+
__all__ += ["AsyncAmazonCreatorsApi"]

0 commit comments

Comments
 (0)