{"id":30615725,"url":"https://github.com/justanotherbyte/waifuim.py","last_synced_at":"2026-02-12T22:32:17.230Z","repository":{"id":133635559,"uuid":"407678712","full_name":"justanotherbyte/waifuim.py","owner":"justanotherbyte","description":"A python wrapper for waifu.im","archived":false,"fork":false,"pushed_at":"2021-09-17T21:06:56.000Z","size":63,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-15T14:47:11.110Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://waifu.im","language":null,"has_issues":false,"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/justanotherbyte.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-09-17T21:02:24.000Z","updated_at":"2021-09-29T18:45:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"0da4d42c-d7bb-4e20-89b9-ef5c6c17b6d0","html_url":"https://github.com/justanotherbyte/waifuim.py","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/justanotherbyte/waifuim.py","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justanotherbyte%2Fwaifuim.py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justanotherbyte%2Fwaifuim.py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justanotherbyte%2Fwaifuim.py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justanotherbyte%2Fwaifuim.py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/justanotherbyte","download_url":"https://codeload.github.com/justanotherbyte/waifuim.py/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justanotherbyte%2Fwaifuim.py/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29383923,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T22:07:52.078Z","status":"ssl_error","status_checked_at":"2026-02-12T22:07:49.026Z","response_time":55,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2025-08-30T08:06:47.196Z","updated_at":"2026-02-12T22:32:17.225Z","avatar_url":"https://github.com/justanotherbyte.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# waifuim.py\r\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/waifuim.py?style=flat-square)](https://pypi.org/project/waifuim.py/)\r\n[![PyPI](https://img.shields.io/pypi/v/waifuim.py?style=flat-square)](https://pypi.org/project/waifuim.py/)\r\n[![License](https://img.shields.io/github/license/Bucolo/waifuim.py?style=flat-square)](https://github.com/Bucolo/waifuim.py/blob/main/LICENSE)\r\n\r\nA Python wrapper for waifu.im API.\r\n\r\n## Table of Contents\r\n- [Installation](#Installation)\r\n- [Usage](#Usage)\r\n- [License](#License)\r\n\r\n## Installation\r\n**Python 3.6 or higher is required.**\r\n\r\nInstall from PyPI\r\n```shell\r\n$ pip install waifuim.py\r\n```\r\n\r\nInstall from source\r\n```shell\r\n$ pip install git+https://github.com/Bucolo/waifuim.py\r\n```\r\n\r\n## Usage\r\nFor now you can only use WaifuAioClient wich is async. Maybe a sync client will be released in the future.\r\n\r\n### Examples with WaifuAioClient\r\n```python\r\nimport asyncio\r\n\r\nfrom waifuim import WaifuAioClient\r\n\r\n\r\nasync def main():\r\n    async with WaifuAioClient() as wf:\r\n\r\n        # Get the json that the api return for the waifu tag\r\n        waifujson= await wf.sfw('waifu',raw=True)\r\n\r\n        # Get one random image url for the waifu tag\r\n        waifu_url = await wf.sfw('waifu')\r\n\r\n        # Get 30 images url for the waifu tag (12 is the tag id)\r\n        waifulist= await wf.nsfw(12,many=True)\r\n\r\n        # Get one ero image excluding some files and the .gif extension\r\n        ero = await wf.nsfw('ero',exclude=['file1','file2.png','file3.jpeg'],gif=False)\r\n\r\n        # Get your gallery (returns a dict)\r\n        gallery=await wf.fav(insert=['file1','file2.png','file3.jpeg'],delete=['file1','file2.png','file3.jpeg'],newtoken=\"The new token you want to use from now on instead of the one passed at the begining (or not).\")\r\n\r\n        #get the endpoints\r\n        endpoints=await wf.endpoints(full=True) #it is optional you can simply not set it to True and get the endpoints without details.\r\n\r\nasyncio.run(main())\r\n```\r\n```python\r\nimport asyncio\r\n\r\nfrom waifuim import WaifuAioClient\r\n\r\n\r\nasync def main():\r\n    wf=WaifuAioClient()\r\n    # Get the json that the api return for the waifu tag\r\n    waifujson= await wf.sfw('waifu',raw=True)\r\n\r\n    # Get one random image url for the waifu tag\r\n    waifu_url = await wf.sfw('waifu')\r\n\r\n    # Get 30 images url for the waifu tag (12 is the tag id)\r\n    waifulist= await wf.nsfw('waifu',many=True)\r\n\r\n    # Get one ero image excluding some files and the .gif extension\r\n    ero = await wf.nsfw('ero',exclude=['file1','file2.png','file3.jpeg'],gif=False)\r\n\r\n    # Get your gallery (returns a dict)\r\n    gallery=await wf.fav(insert=['file1','file2.png','file3.jpeg'],delete=['file1','file2.png','file3.jpeg'],newtoken=\"The new token you want to use from now on instead of the one passed at the begining (or not).\")\r\n\r\n    # Get the endpoints\r\n    endpoints=await wf.endpoints(full=True) #it is optional you can simply not set it to True and get the endpoints without details.\r\n    await wf.close()\r\n\r\nasyncio.run(main())\r\n```\r\n\r\n### Some interesting attributes\r\nYou can pass some useful kwargs to the class\r\n\r\n```python\r\nimport aiohttp\r\n\r\nfrom waifuim import WaifuAioClient\r\n\r\nwf = WaifuAioClient(session=aiohttp.ClientSession(),appname=\"MyDiscordBot\",token=\"The Token that fav will use if newtoken isn't provided.\",maintenance_error=\"The error message that you want to raise if the api is returning a 502.\")\r\n\r\n# ...\r\n```\r\n\r\n## License\r\nMIT Â© [Buco](https://github.com/Bucolo/waifuim.py/blob/main/LICENSE)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustanotherbyte%2Fwaifuim.py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjustanotherbyte%2Fwaifuim.py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustanotherbyte%2Fwaifuim.py/lists"}