{"id":26774634,"url":"https://github.com/plutokekz/riotapiparser","last_synced_at":"2026-05-15T13:34:06.848Z","repository":{"id":176180786,"uuid":"480312218","full_name":"Plutokekz/RiotApiParser","owner":"Plutokekz","description":"A small script to parse the riot api documentation to generate json schema file, which get converted to pydantic models aka python dataclasses. For an eay and fast prototyping of api wrappers.","archived":false,"fork":false,"pushed_at":"2022-10-25T21:03:24.000Z","size":68,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-05-06T02:11:23.568Z","etag":null,"topics":["bs4","code-generation","json-schema","league-of-legends","legends-of-runeterra","parser","pydantic","python","riot-games-api","tft","valorant"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Plutokekz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-04-11T09:29:07.000Z","updated_at":"2022-04-13T12:41:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"73e6e100-3a7c-4e3d-9a19-7c622cb0d412","html_url":"https://github.com/Plutokekz/RiotApiParser","commit_stats":null,"previous_names":["plutokekz/riotapiparser"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Plutokekz/RiotApiParser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Plutokekz%2FRiotApiParser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Plutokekz%2FRiotApiParser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Plutokekz%2FRiotApiParser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Plutokekz%2FRiotApiParser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Plutokekz","download_url":"https://codeload.github.com/Plutokekz/RiotApiParser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Plutokekz%2FRiotApiParser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32924412,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-11T17:09:15.040Z","status":"online","status_checked_at":"2026-05-12T02:00:06.338Z","response_time":102,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bs4","code-generation","json-schema","league-of-legends","legends-of-runeterra","parser","pydantic","python","riot-games-api","tft","valorant"],"created_at":"2025-03-29T02:17:35.679Z","updated_at":"2026-05-15T13:34:06.834Z","avatar_url":"https://github.com/Plutokekz.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RiotApiParser \nA small script to parse the riot api documentation to generate json schema file,\nwhich get converted to pydantic models aka python dataclasses. For an eay and fast prototyping\nof api wrappers. \n### Installation\nclone or downloade the repository and install the requirements\n\n```bash\ncd RiotApiParser\npip install -r requirements.txt\n```\n### Run\n\n```cmd\npython main.py -h\nusage: main.py [-h] [-p PARSER] [-jp JSON_PATH] [-pp PYTHON_PATH] [-u URL]\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -p PARSER, --parser PARSER\n                        select a parser for bs4, default: lxml\n  -jp JSON_PATH, --jsonpath JSON_PATH\n                        Path to store the json schema file, default: models\n  -pp PYTHON_PATH, --pythonpath PYTHON_PATH\n                        Path to store the python file, default: python\n  -u URL, --url URL     url to riot developers page with the api documentation, default: https://developer.riotgames.com/apis\n```\n````bash\npython main.py\n````\nIf the script run's with the default arguments, you got two folder models and python.\nIn the models' directory is the json schema located and in the python directory the generated\npython files.\n\n### Example\nParsing the website entry to json schema\n![](images/img.png)\n````json\n{\n  \"title\": \"AccountDto\",\n  \"$schema\": \"http://json-schema.org/draft-07/schema#\",\n  \"type\": \"object\",\n  \"properties\": {\n    \"puuid\": {\n      \"type\": \"string\"\n    },\n    \"gameName\": {\n      \"type\": \"string\",\n      \"description\": \"This field may be excluded from the response if the account doesn't have a gameName.\"\n    },\n    \"tagLine\": {\n      \"type\": \"string\",\n      \"description\": \"This field may be excluded from the response if the account doesn't have a tagLine.\"\n    }\n  }\n}\n````\nGenerating python code from the json schema\n````python\n# generated by datamodel-codegen:\n#   filename:  AccountDto.json\n#   timestamp: 2022-04-11T09:10:43+00:00\n\nfrom __future__ import annotations\n\nfrom typing import Optional\n\nfrom pydantic import BaseModel, Field\n\n\nclass AccountDto(BaseModel):\n    puuid: Optional[str] = None\n    gameName: Optional[str] = Field(\n        None,\n        description=\"This field may be excluded from the response if the account doesn't have a gameName.\",\n    )\n    tagLine: Optional[str] = Field(\n        None,\n        description=\"This field may be excluded from the response if the account doesn't have a tagLine.\",\n    )\n````","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplutokekz%2Friotapiparser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplutokekz%2Friotapiparser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplutokekz%2Friotapiparser/lists"}