RAWG.io API Wrapper
Project description
RAWG.io API Wrapper
Simple example
import asyncio
from rawg import AioRawg
async def main():
r = AioRawg()
keyword = 'metal gear'
search = await r.search(keyword, page_size=3)
print('Found:', search.count)
for game in search.results:
print('--', game.name)
print('----', 'Rating:', game.rating)
for genre in game.genres:
print('----', genre.name)
if __name__ == '__main__':
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
Result:
Found: 1841
-- Metal Gear
---- Rating: 4.0
-- METAL GEAR RISING: REVENGEANCE
---- Rating: 4.13
---- Action
-- Metal Gear Solid
---- Rating: 4.22
---- Shooter
---- Adventure
---- Action
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
rawg-0.2.tar.gz
(3.6 kB
view hashes)
Built Distribution
rawg-0.2-py3-none-any.whl
(4.1 kB
view hashes)