Skip to content

Latest commit

 

History

History
31 lines (22 loc) · 933 Bytes

README.md

File metadata and controls

31 lines (22 loc) · 933 Bytes

PyGramedia

Build Status Coverage Status

Unofficial API wrapper for Gramedia, the biggest bookstore in Indonesia and based on coroutine python 3.

Requirement:

  • Python 3.6 and above.

Installation:

pip install pygramedia

Usage:

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))