Unofficial API wrapper for Gramedia, the biggest bookstore in Indonesia and based on coroutine python 3.
- Python 3.6 and above.
pip install pygramedia
import asyncio
from pygramed import PyGramedia
obj = PyGramedia()
# Async mode based on coroutine.
coro = obj.product.retrieve_async()
coro = obj.product.retrieve_async(limit=5)
coro = obj.product.retrieve_async(limit=10, category='keluarga')
loop = asyncio.get_event_loop()
print(loop.run_until_complete(coro))
# Sync mode like general function.
print(obj.product.retrieve(limit=10))