anmoku


Nameanmoku JSON
Version 1.0.0.dev1 PyPI version JSON
download
home_pageNone
SummaryA peaceful and fully typed MyAnimeList/Jikan API wrapper with caching and proper rate limiting.
upload_time2024-04-27 13:57:52
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT License Copyright (c) 2023-present Goldy Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords anime api wrapper mal myanimelist my anime list jikan api wrapper async anime api wrapper jikan caching jikan rate limiting
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">

  # Anmoku 安黙

  <sub>A peaceful and fully typed [MyAnimeList](https://myanimelist.net/) / [Jikan](https://jikan.moe/) Python API wrapper with caching and proper rate limiting.</sub>

  <br>

</div>

> [!NOTE]
> 
> Anmoku is currently a work in progress so the features below may not be complete yet.

## Features ✨
- [ ] Rate limiting 🎀 (with actual waiting).
- [ ] Supports caching. ⚡
- [ ] [Fully type hinted.](#type-hinting-support-) 🌌 ~~*yes you heard me correctly*~~

## Examples ⚗️
Anmoku is probably the simplest Jikan API wrapper you'll ever use. All you need is the client and the resource. 🌊
```python
from anmoku import Anmoku, AnimeCharacters

client = Anmoku(debug = True)

anime_characters = client.get(AnimeCharacters, id = 28851) # ID for the anime film "A Silent Voice".

for character in anime_characters:
    print(f"{character.name} ({character.url})")

client.close()
```
We also have an async client:
```python
import asyncio
from anmoku import AsyncAnmoku, AnimeCharacters

async def main():

    client = AsyncAnmoku(debug = True)

    anime_characters = await client.get(AnimeCharacters, id = 28851) # ID for the anime film "A Silent Voice".

    for character in anime_characters:
        print(f"{character.name} ({character.url})")

    await client.close()

asyncio.run(main())
```

#### Output:
```sh
[DEBUG] (anmoku) - [AsyncAnmoku] GET --> https://api.jikan.moe/v4/anime/28851/characters
Ishida, Shouya (https://myanimelist.net/character/80491/Shouya_Ishida)
Nishimiya, Shouko (https://myanimelist.net/character/80243/Shouko_Nishimiya)
Headteacher (https://myanimelist.net/character/214351/Headteacher)
Hirose, Keisuke (https://myanimelist.net/character/97569/Keisuke_Hirose)
Ishida, Maria (https://myanimelist.net/character/97943/Maria_Ishida)
Ishida, Sister (https://myanimelist.net/character/118723/Sister_Ishida)
# ... more characters below but I cut them off for the convenience of this readme
```

### Searching! 🤩
Here are some searching examples you can try:
```python
from anmoku import Anmoku, Character

client = Anmoku(debug = True)

characters = client.search(Character, "anya forger")

for character in characters:
    print(f"{character.name} ({character.image.url})")

client.close()
```
Merge that with gradio and you have a GUI.
https://github.com/THEGOLDENPRO/anmoku/blob/099f6596b685daa65259319d6730bef674ced38a/examples/gradio_anime_search.py#L1-L23

[[Gradio Video]](https://github.com/THEGOLDENPRO/anmoku/assets/66202304/75c9c35c-bf68-4c53-96e5-057dc97ca1dd)

## Type hinting support! 🌌
API responses in our library are strongly typed.

<img src="./assets/type_hints_1.png" width="100%">

On top of that, we even provide class interfaces if you wish for stability and ease of use.

<img src="./assets/type_hints_3.png" width="100%">
<img src="./assets/type_hints_2.png" width="100%">

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "anmoku",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "anime api wrapper, mal, myanimelist, My Anime List, jikan api wrapper, async anime api wrapper, jikan caching, jikan rate limiting",
    "author": null,
    "author_email": "Goldy <goldy@devgoldy.xyz>, EmreTech <emreterzioglu49@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/eb/e6/303f37f6904f2051b3b8f314fd2ea858324d57efbf4510884736e41b29e5/anmoku-1.0.0.dev1.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\n\n  # Anmoku \u5b89\u9ed9\n\n  <sub>A peaceful and fully typed [MyAnimeList](https://myanimelist.net/) / [Jikan](https://jikan.moe/) Python API wrapper with caching and proper rate limiting.</sub>\n\n  <br>\n\n</div>\n\n> [!NOTE]\n> \n> Anmoku is currently a work in progress so the features below may not be complete yet.\n\n## Features \u2728\n- [ ] Rate limiting \ud83c\udf80 (with actual waiting).\n- [ ] Supports caching. \u26a1\n- [ ] [Fully type hinted.](#type-hinting-support-) \ud83c\udf0c ~~*yes you heard me correctly*~~\n\n## Examples \u2697\ufe0f\nAnmoku is probably the simplest Jikan API wrapper you'll ever use. All you need is the client and the resource. \ud83c\udf0a\n```python\nfrom anmoku import Anmoku, AnimeCharacters\n\nclient = Anmoku(debug = True)\n\nanime_characters = client.get(AnimeCharacters, id = 28851) # ID for the anime film \"A Silent Voice\".\n\nfor character in anime_characters:\n    print(f\"{character.name} ({character.url})\")\n\nclient.close()\n```\nWe also have an async client:\n```python\nimport asyncio\nfrom anmoku import AsyncAnmoku, AnimeCharacters\n\nasync def main():\n\n    client = AsyncAnmoku(debug = True)\n\n    anime_characters = await client.get(AnimeCharacters, id = 28851) # ID for the anime film \"A Silent Voice\".\n\n    for character in anime_characters:\n        print(f\"{character.name} ({character.url})\")\n\n    await client.close()\n\nasyncio.run(main())\n```\n\n#### Output:\n```sh\n[DEBUG] (anmoku) - [AsyncAnmoku] GET --> https://api.jikan.moe/v4/anime/28851/characters\nIshida, Shouya (https://myanimelist.net/character/80491/Shouya_Ishida)\nNishimiya, Shouko (https://myanimelist.net/character/80243/Shouko_Nishimiya)\nHeadteacher (https://myanimelist.net/character/214351/Headteacher)\nHirose, Keisuke (https://myanimelist.net/character/97569/Keisuke_Hirose)\nIshida, Maria (https://myanimelist.net/character/97943/Maria_Ishida)\nIshida, Sister (https://myanimelist.net/character/118723/Sister_Ishida)\n# ... more characters below but I cut them off for the convenience of this readme\n```\n\n### Searching! \ud83e\udd29\nHere are some searching examples you can try:\n```python\nfrom anmoku import Anmoku, Character\n\nclient = Anmoku(debug = True)\n\ncharacters = client.search(Character, \"anya forger\")\n\nfor character in characters:\n    print(f\"{character.name} ({character.image.url})\")\n\nclient.close()\n```\nMerge that with gradio and you have a GUI.\nhttps://github.com/THEGOLDENPRO/anmoku/blob/099f6596b685daa65259319d6730bef674ced38a/examples/gradio_anime_search.py#L1-L23\n\n[[Gradio Video]](https://github.com/THEGOLDENPRO/anmoku/assets/66202304/75c9c35c-bf68-4c53-96e5-057dc97ca1dd)\n\n## Type hinting support! \ud83c\udf0c\nAPI responses in our library are strongly typed.\n\n<img src=\"./assets/type_hints_1.png\" width=\"100%\">\n\nOn top of that, we even provide class interfaces if you wish for stability and ease of use.\n\n<img src=\"./assets/type_hints_3.png\" width=\"100%\">\n<img src=\"./assets/type_hints_2.png\" width=\"100%\">\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2023-present Goldy  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "A peaceful and fully typed MyAnimeList/Jikan API wrapper with caching and proper rate limiting.",
    "version": "1.0.0.dev1",
    "project_urls": {
        "BugTracker": "https://github.com/THEGOLDENPRO/anmoku/issues",
        "GitHub": "https://github.com/THEGOLDENPRO/anmoku"
    },
    "split_keywords": [
        "anime api wrapper",
        " mal",
        " myanimelist",
        " my anime list",
        " jikan api wrapper",
        " async anime api wrapper",
        " jikan caching",
        " jikan rate limiting"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "97bf6d8a663cb35cd599350de2cbf5ee2873cacbf30e10ca7f301e307450920c",
                "md5": "8278e214ee810bd149dc2ca69f2b39c9",
                "sha256": "2c302128aca3dad58f927d05131c3820fdf3c0059a93dd700c0105444d0de7cc"
            },
            "downloads": -1,
            "filename": "anmoku-1.0.0.dev1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8278e214ee810bd149dc2ca69f2b39c9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 25483,
            "upload_time": "2024-04-27T13:57:48",
            "upload_time_iso_8601": "2024-04-27T13:57:48.471451Z",
            "url": "https://files.pythonhosted.org/packages/97/bf/6d8a663cb35cd599350de2cbf5ee2873cacbf30e10ca7f301e307450920c/anmoku-1.0.0.dev1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ebe6303f37f6904f2051b3b8f314fd2ea858324d57efbf4510884736e41b29e5",
                "md5": "f9479f74a1cee02e00097964dd920513",
                "sha256": "f9fb491763fac6f8700129ff6105a9d11250c17d6cc9c3800affcc29e1a6a944"
            },
            "downloads": -1,
            "filename": "anmoku-1.0.0.dev1.tar.gz",
            "has_sig": false,
            "md5_digest": "f9479f74a1cee02e00097964dd920513",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 5058761,
            "upload_time": "2024-04-27T13:57:52",
            "upload_time_iso_8601": "2024-04-27T13:57:52.683273Z",
            "url": "https://files.pythonhosted.org/packages/eb/e6/303f37f6904f2051b3b8f314fd2ea858324d57efbf4510884736e41b29e5/anmoku-1.0.0.dev1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-27 13:57:52",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "THEGOLDENPRO",
    "github_project": "anmoku",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "anmoku"
}
        
Elapsed time: 0.33344s