{"id":28638932,"url":"https://github.com/sas2k/xkcd-python","last_synced_at":"2025-06-12T19:09:45.924Z","repository":{"id":37694512,"uuid":"506127915","full_name":"Sas2k/xkcd-python","owner":"Sas2k","description":"A wrapper for xkcd.com api built with python","archived":false,"fork":false,"pushed_at":"2022-11-14T15:01:16.000Z","size":39,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-02T08:27:08.687Z","etag":null,"topics":["library","python","wrapper","wrapper-api","xkcd","xkcd-api"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/xkcd-python/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Sas2k.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-06-22T06:40:11.000Z","updated_at":"2022-10-08T03:58:08.000Z","dependencies_parsed_at":"2022-07-12T16:43:27.512Z","dependency_job_id":null,"html_url":"https://github.com/Sas2k/xkcd-python","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/Sas2k/xkcd-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sas2k%2Fxkcd-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sas2k%2Fxkcd-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sas2k%2Fxkcd-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sas2k%2Fxkcd-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sas2k","download_url":"https://codeload.github.com/Sas2k/xkcd-python/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sas2k%2Fxkcd-python/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259519871,"owners_count":22870374,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["library","python","wrapper","wrapper-api","xkcd","xkcd-api"],"created_at":"2025-06-12T19:09:44.511Z","updated_at":"2025-06-12T19:09:45.905Z","avatar_url":"https://github.com/Sas2k.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# xkcd-python\n\n![PYPI weekly Downloads](https://img.shields.io/pypi/dw/xkcd-python?style=for-the-badge)\n![PYPI monthly Downloads](https://img.shields.io/pypi/dm/xkcd-python?style=for-the-badge)\n\nxkcd-python is an API wrapper for xkcd.com written in python.\n\n## Installation\n\nUse the package manager [pip](https://pip.pypa.io/en/stable/) to install xkcd-python.\n\n```bash\npip install -U xkcd-python\n```\n\n## Usage\n\n### Normal usage\n\n```python\nfrom xkcd_python import Client\n\n#creates the client\nclient = Client()\n\n# returns the comic by id\nclient.get(1)\n\n# returns a random comic\nclient.random()\n\n# returns the latest comic\nclient.latest_comic()\n```\n\n### Async usage\n\n```python\nfrom xkcd_python import Client\nimport asyncio\n\nclient = Client()\n\nasync def main():\n    tasks = (client.get(x) for x in range(1, 20))\n    return await asyncio.gather(*tasks)\n\nasyncio.run(main)\n```\n\n## Contributing\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\nPlease make sure to update tests as appropriate.\n\n## License\n[MIT](https://github.com/Sas2k/xkcd-python/blob/main/LICENSE)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsas2k%2Fxkcd-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsas2k%2Fxkcd-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsas2k%2Fxkcd-python/lists"}