{ "info": { "author": "uburuntu", "author_email": "bekbulatov.ramzan@ya.ru", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "Programming Language :: Python :: 3" ], "description": "# RAWG.io API Wrapper\n\n[![Python](https://img.shields.io/badge/Python-3.6%20%7C%203.7%20%7C%203.8-blue.svg?longCache=true)]()\n[![PyPI](https://img.shields.io/pypi/v/rawg.svg)](https://pypi.python.org/pypi/rawg)\n\n[![Build Status](https://travis-ci.org/uburuntu/rawg.svg?branch=master)](https://travis-ci.org/uburuntu/rawg)\n[![codecov](https://codecov.io/gh/uburuntu/rawg/branch/master/graph/badge.svg)](https://codecov.io/gh/uburuntu/rawg)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/aaf685a78dbf4377b8f36b401a5ccda1)](https://www.codacy.com/app/uburuntu/rawg?utm_source=github.com&utm_medium=referral&utm_content=uburuntu/rawg&utm_campaign=Badge_Grade)\n\nPretty simple API wrapper for RAWG.io with typings.\n\nYou can use both sync and async realizations. \n\n_Contributions are welcome!_\n\n## API Usage\n\n### Installation\nJust\n```\npip install rawg\n``` \nor maybe `pip3`.\n\n### Simple example\n```python\nfrom rawg import Rawg\n\nr = Rawg()\ns = r.search('half life 3')\n\nresult = s.results[0]\nprint(result.name, result.released)\n```\n\n### Async example\n\n```python\nimport asyncio\n\nfrom rawg import AioRawg\nfrom rawg.types import RawgGame\n\n\nasync def main():\n rawg = AioRawg()\n\n search = await rawg.search('metal gear', page_size=3)\n requests = [rawg.info(game) for game in search.results]\n\n print('Search results:', search.count)\n for request in asyncio.as_completed(requests):\n game: RawgGame = await request\n print(game.name)\n print('--', 'Released:', game.released)\n print('--', 'Rating:', game.rating)\n print('--', 'Genres:', ', '.join(genre.name for genre in game.genres))\n print('--', 'Available on:', ', '.join(p.platform.name for p in game.platforms))\n\n\nif __name__ == '__main__':\n loop = asyncio.get_event_loop()\n loop.run_until_complete(main())\n```\n\nResult:\n```\nSearch results: 1846\nMetal Gear Solid\n-- Released: 1998-09-03\n-- Rating: 4.23\n-- Genres: Action, Shooter, Adventure\n-- Available on: PlayStation, PS Vita, PC, PSP, PlayStation 3\nMetal Gear\n-- Released: 1987-07-07\n-- Rating: 3.95\n-- Genres: \n-- Available on: PC, Wii, NES, Commodore / Amiga\nMETAL GEAR RISING: REVENGEANCE\n-- Released: 2013-02-19\n-- Rating: 4.14\n-- Genres: Action\n-- Available on: Xbox 360, PlayStation 3, PC\n```\n\n### Manual\n\n#### Methods\nAPI have 3 methods:\n* `search` \u2014 search for a game by name, return type: `RawgSearch`\n * `RawgSearch` have attribute `results` of type `List[RawgGameSearch]`\n* `suggested` \u2014 find more similar games via RAWG ML, return type: `RawgSuggested`\n * `RawgSuggested` have attribute `results` of type `List[RawgGameSuggested]`\n* `info` \u2014 detailed information about the game, return type: `RawgGame`\n * `RawgGame` is more detailed than `RawgGameSearch` and `RawgGameSuggested`\n\n#### Types\nThis library uses [pydantic](https://github.com/samuelcolvin/pydantic/) for parsing API responses.\nMain types are: `RawgPlatformData`, `RawgPlatform`, `RawgStoreData`, `RawgStore`, `RawgRating`, `RawgAddedByStatus`, `RawgChartYear`, `RawgCharts`, `RawgClips`, `RawgClip`, `RawgScreenshot`, `RawgGenre`, `RawgGameBase`, `RawgGame`, `RawgGameSearch`, `RawgGameSuggested`, `RawgSearch`. And declared in [rawg/types.py](rawg/types.py).\n\n\n### In case of unsupported types\nAPI results can change and the library may not parse the new result. So you can use parameter `raw_results` for requesting \u00abraw\u00bb dicts: \n```python\nr = AioRawg(raw_results=True)\n# Or\nr = Rawg(raw_results=True)\n```\n\n## API Docs\n\n**Link**: https://rawg.io/apidocs\n\n#### API Rules\n* every API request should have a `User-Agent` header with your app name\n * You can set your app name through argument `app_name`: `Rawg(app_name='Meduza')` or `AioRawg(app_name='Rawg.io Telegram Bot')` \n* no mass extraction & no cloning RAWG\n\n\n## Another libraries\n\n**Python**: laundmo/[rawgpy](https://pypi.org/project/rawgpy)\n\n**Node.js**: orels1/[rawger](https://github.com/orels1/rawger)\n\n## Contact\n\n[![](https://img.shields.io/badge/Telegram-@rm__bk-blue.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAEbklEQVQ4y62US2xUdRjFf%2F%2F%2FfUynnXaGKW15FHnVKm8SRCFB3ZhYRVQSISHKBhKjK2JiTIyuXJC40oUrY%2BJGTZSABomiC0kUFYEIFRWrQi1tmXb6mE7be%2BfOvf%2F7%2F1z0Ydh71t93vpPz5RxlUoujFSOB4dxQQGKFUs2AFRIr9%2FRVzdO%2FVZNVvqPsjqL31%2BYl3icNjh4dDAyNrsPzm%2FL4riZOhRbfwWUeAohAe9ZhrG6af6mYF27X0gPVRHZ6jsYquDxpGAjSJ7rz3om2jHqv2VOLuwtQCwpHA8NvExEXx6JnTg6Eb0%2FU7UpPK3Kewp3bI05hOrEIkHPV1aPduRePbStesAKhseQ8B63V3HRHk8t3o9HLx3unTlRju7KjQVPwFM68chHwNLRlNB0NmtlEtr%2FZO%2FXjlwNBj1aKxM4rjJKUjKv5ZijY2%2FPF8JmuvE%2Fe%2B29gAVqBo6CeCkOBoT3rkFgo14y8%2B%2FCy9bs6sv2rci66HCZcG69lX%2Fq%2B%2FEGrr2lxFbERxAoiggY0Qjk0XB6NGJpN2NORZU3Oo8lRiBX14Z%2FVjypROnc46zqcvRUe7avEhVVNLnVjAcHVEBnL9cmIa%2BMRSzzNqzuWcvrxTk49tpINBZ8%2FKnW6WjzOl2q7LowEewDci6Nh57nh4Lmcq0itRaMYDQ3DMwltjR777sqxv6uFA13Nd1jQOx6R1aAEYmO5Ol5%2FFjjvfnZz5sDgdPJAq68RC4OzCe1ZhyP3t3Ho7jwbij4ApUrITJKybmmOSpRyqxpT8B2SVCj6Dr3j9e0A7ve3wy6FwtOKG1N1jm1v5Y3d7YtKarHhymCVfKPHpuUtAFwZrzMwk7A%2B72OskPcUlZopzHnoaJOKYK2lkHG4NBJy%2FKcxfh2LCGoxlwerrCg0LJIB9FfrRIkFmXtcnFpEJAXQPaubfnQgmK6nFD3FlXLEa%2BdK7Pn4Jt%2FerLCxNcua1qY7%2FLtYqqERsIISYSwwrGh0RwD00c3Fk1taM1%2BVZhJiKyzJaDYub6CaCH8HQjBW4cyv5TsIf5%2BIaHQUqVhEhGpk6Mr75wF0aTZJugv%2Bu1YEY4XUWlIrNHmKn8s1zo7E7Ds1yJMn%2BxcJ%2ByYjChmNFZiqGVobHJ5Y1%2Fw%2BgDsaGnrWNn91qRRe%2BLp%2Feld3a5bEWFY0aM4N1zg9AJ3LGvm8b4pHT9xkdYsHVshqhSPC7Yk6h7YW3%2BlZ2zwAoH4ph6xo9vhhKOg8cmbgulEq197kYUWI5%2BPna%2FAcRX81JjLChmIGC%2FSVa%2BzszPV9un%2FNFoRkZbOHrqfCWJiitRp6ZH1%2Bj68YuTFVJ04FX4GrhNQKUWLpzHl0F3wmaoYbkxH3Lm24%2Bvru9gcLvpPUzHz0FoI%2FW7fE1vYe3lK8b%2B%2FalhNBnFIOEyZDgxXBpEJ5NqE0m5BxVPpQZ%2B6tV3a17xAYGw0NC621WLBKwXQ9pcV3hw9vzh3M%2BWr74ExyMDGy7XaQLHM1srUt2681l5%2Fqyn9shH8mohTf0TgK0vmWVSLC%2F4l%2FAXWxRtaDbtHIAAAAAElFTkSuQmCC)](https://t.me/rm_bk)\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "https://github.com/uburuntu/rawg/archive/master.zip", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/uburuntu/rawg", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "rawg", "package_url": "https://pypi.org/project/rawg/", "platform": "", "project_url": "https://pypi.org/project/rawg/", "project_urls": { "Download": "https://github.com/uburuntu/rawg/archive/master.zip", "Homepage": "https://github.com/uburuntu/rawg" }, "release_url": "https://pypi.org/project/rawg/0.4/", "requires_dist": [ "aiohttp", "pydantic", "requests" ], "requires_python": "", "summary": "RAWG.io API Wrapper", "version": "0.4" }, "last_serial": 5922866, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "8064c5ed6b59c7e3feb6bdeb86e16724", "sha256": "905abeaf4d3fd6daf326f65755d7d0234f62b6f7c5e8a6a3d686f8fec08d74ce" }, "downloads": -1, "filename": "rawg-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "8064c5ed6b59c7e3feb6bdeb86e16724", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3642, "upload_time": "2019-06-13T01:44:59", "url": "https://files.pythonhosted.org/packages/37/4f/9be5eec8f49137138859d115c04353f0a58b02132bd66ccbd337c7325501/rawg-0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6de05575559aea849d3e7a927bee1cd3", "sha256": "0f639756a2a38680265f33f9028bd696910f0a282ae6457934f1c1416be322e3" }, "downloads": -1, "filename": "rawg-0.1.tar.gz", "has_sig": false, "md5_digest": "6de05575559aea849d3e7a927bee1cd3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3078, "upload_time": "2019-06-13T01:45:02", "url": "https://files.pythonhosted.org/packages/6a/62/7b299572c8a8de5a23b22548b0d59d359c3574b54b793f177fffdc9d9dc1/rawg-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "37531a4e4e20a25276820df0f57328d7", "sha256": "1d479a1eae78afae8abf4fad7db3ccceed9000fc0268d07bdf97420ec67de45a" }, "downloads": -1, "filename": "rawg-0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "37531a4e4e20a25276820df0f57328d7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4147, "upload_time": "2019-06-13T16:57:42", "url": "https://files.pythonhosted.org/packages/2e/57/94144ccf9a7e267ab2bd3fee77e3f6601fbf9cacbd13eed8bc970415452d/rawg-0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c038aa3d9200d743958f5c10141cf85c", "sha256": "8d24d198c766c050b071db57efb111c7e8ae86056d4e0ea80c55a28ae8f214a7" }, "downloads": -1, "filename": "rawg-0.2.tar.gz", "has_sig": false, "md5_digest": "c038aa3d9200d743958f5c10141cf85c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3573, "upload_time": "2019-06-13T16:57:44", "url": "https://files.pythonhosted.org/packages/d8/25/1756397df98d12914d8e4642c3362dd0f01a06e33caa34ed139cbb321da0/rawg-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "e92cb771352707dbbb0ea3475aaa5f3e", "sha256": "5e4c49c9c00c0607468aff9c856d7c91687a5205afbcc4a4bb362d3a9322c8c6" }, "downloads": -1, "filename": "rawg-0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "e92cb771352707dbbb0ea3475aaa5f3e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5442, "upload_time": "2019-06-15T00:19:51", "url": "https://files.pythonhosted.org/packages/dc/9b/277b57825b8834e0175b07218646ac0aa4f2b23ca32ebc0fbfcb1f267059/rawg-0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6804e7c9e75e19531488c9e6ab8c164d", "sha256": "974ba3f6cf0ce9d422f95ad162c0b54d2ed5bd517a1e207066696f9b4ba4b77f" }, "downloads": -1, "filename": "rawg-0.3.tar.gz", "has_sig": false, "md5_digest": "6804e7c9e75e19531488c9e6ab8c164d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4903, "upload_time": "2019-06-15T00:19:54", "url": "https://files.pythonhosted.org/packages/ed/f9/c56094e4edcc015837b4d2c54ba318187096508d8684bdf450d6b44c3434/rawg-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "e2b9d99f682dd552a6b31ea946b1715e", "sha256": "1c8e9283f71ceb81e699a91a1a86bb6f91af972769cf34bc831bcc3078a59426" }, "downloads": -1, "filename": "rawg-0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "e2b9d99f682dd552a6b31ea946b1715e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6834, "upload_time": "2019-10-03T11:03:46", "url": "https://files.pythonhosted.org/packages/c4/91/dce64fe20db0aa45327c55135698fbf0d94d7f37c2a379a7e8272b897733/rawg-0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "811d01126140175b4d59c9a46d3eeb4b", "sha256": "5403fc53f920a4d9daceee54b66b32c49d996349787af3846ccde3fbf207e5a4" }, "downloads": -1, "filename": "rawg-0.4.tar.gz", "has_sig": false, "md5_digest": "811d01126140175b4d59c9a46d3eeb4b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6409, "upload_time": "2019-10-03T11:03:49", "url": "https://files.pythonhosted.org/packages/ac/0e/98adadf1c331009a3aad799a760413d98f3bbcb822936e1082dfb0244d0a/rawg-0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e2b9d99f682dd552a6b31ea946b1715e", "sha256": "1c8e9283f71ceb81e699a91a1a86bb6f91af972769cf34bc831bcc3078a59426" }, "downloads": -1, "filename": "rawg-0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "e2b9d99f682dd552a6b31ea946b1715e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6834, "upload_time": "2019-10-03T11:03:46", "url": "https://files.pythonhosted.org/packages/c4/91/dce64fe20db0aa45327c55135698fbf0d94d7f37c2a379a7e8272b897733/rawg-0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "811d01126140175b4d59c9a46d3eeb4b", "sha256": "5403fc53f920a4d9daceee54b66b32c49d996349787af3846ccde3fbf207e5a4" }, "downloads": -1, "filename": "rawg-0.4.tar.gz", "has_sig": false, "md5_digest": "811d01126140175b4d59c9a46d3eeb4b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6409, "upload_time": "2019-10-03T11:03:49", "url": "https://files.pythonhosted.org/packages/ac/0e/98adadf1c331009a3aad799a760413d98f3bbcb822936e1082dfb0244d0a/rawg-0.4.tar.gz" } ] }