Skip to main content

RAWG.io API Wrapper

Project description

RAWG.io API Wrapper

Python в©ѕ 3.6 PyPI

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.1.tar.gz (3.1 kB view hashes)

Uploaded Source

Built Distribution

rawg-0.1-py3-none-any.whl (3.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page