<br/>
<p align="center">
<a href="https://github.com/Ravencentric/pyanilist">
<img src="https://raw.githubusercontent.com/Ravencentric/pyanilist/main/docs/assets/logo.png" alt="Logo" width="400">
</a>
<p align="center">
Simple AniList API wrapper to fetch media data
</p>
</p>
<div align="center">
[![PyPI - Version](https://img.shields.io/pypi/v/pyanilist?link=https%3A%2F%2Fpypi.org%2Fproject%2Fpyanilist%2F)](https://pypi.org/project/pyanilist/)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pyanilist)
![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/Ravencentric/pyanilist/release.yml)
![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/ravencentric/pyanilist/test.yml?label=tests)
![License](https://img.shields.io/github/license/Ravencentric/pyanilist)
![Checked with mypy](https://www.mypy-lang.org/static/mypy_badge.svg)
![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)
</div>
## Table Of Contents
* [About](#about)
* [Installation](#installation)
* [Docs](#docs)
* [License](#license)
## About
- Supports both sync and async.
- Provides easy access to almost every field present in AniList's `Media` type.
- Only supports querying the `Media` type
## Installation
`pyanilist` is available on [PyPI](https://pypi.org/project/pyanilist/), so you can simply use [pip](https://github.com/pypa/pip) to install it.
```sh
pip install pyanilist
```
## Usage
1. `AniList()` - Synchronous class
- `search()` - Search a media
```py
from pyanilist import AniList, MediaType
media = AniList().search("Attack on Titan", type=MediaType.ANIME)
print(media.title.romaji)
"""
Shingeki no Kyojin
"""
print(media.site_url)
"""
https://anilist.co/anime/16498
"""
print(media.episodes)
"""
25
"""
```
- `get()` - Get a media by it's AniList ID
```py
from pyanilist import AniList
media = AniList().get(21459)
print(media.title.english)
"""
My Hero Academia
"""
print(media.site_url)
"""
https://anilist.co/anime/21459
"""
print(media.episodes)
"""
13
"""
```
2. `AsyncAniList()` - Asynchronous class
- `search()` - Search a media
```py
import asyncio
from pyanilist import AsyncAniList, MediaType
media = asyncio.run(AsyncAniList().search("Attack on Titan", type=MediaType.ANIME))
print(media.title.romaji)
"""
Shingeki no Kyojin
"""
print(media.site_url)
"""
https://anilist.co/anime/16498
"""
print(media.episodes)
"""
25
"""
```
- `get()` - Get a media by it's AniList ID
```py
import asyncio
from pyanilist import AsyncAniList
media = asyncio.run(AsyncAniList().get(21459))
print(media.title.english)
"""
My Hero Academia
"""
print(media.site_url)
"""
https://anilist.co/anime/21459
"""
print(media.episodes)
"""
13
"""
```
## Docs
Checkout the complete documentation [here](https://pyanilist.zip).
## License
Distributed under the [Unlicense](https://choosealicense.com/licenses/unlicense/) License. See [UNLICENSE](https://github.com/Ravencentric/pyanilist/blob/main/UNLICENSE) for more information.
Raw data
{
"_id": null,
"home_page": "https://pyanilist.zip",
"name": "pyanilist",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "anilist, anime, python",
"author": "Raventric",
"author_email": "raven@pyanilist.zip",
"download_url": "https://files.pythonhosted.org/packages/68/8c/154b10843c9f9d778d8a79023ecbfbcab6f6148e38752811c40c322619f8/pyanilist-0.4.1.tar.gz",
"platform": null,
"description": "<br/>\n<p align=\"center\">\n <a href=\"https://github.com/Ravencentric/pyanilist\">\n <img src=\"https://raw.githubusercontent.com/Ravencentric/pyanilist/main/docs/assets/logo.png\" alt=\"Logo\" width=\"400\">\n </a>\n <p align=\"center\">\n Simple AniList API wrapper to fetch media data\n </p>\n</p>\n\n<div align=\"center\">\n\n[![PyPI - Version](https://img.shields.io/pypi/v/pyanilist?link=https%3A%2F%2Fpypi.org%2Fproject%2Fpyanilist%2F)](https://pypi.org/project/pyanilist/)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pyanilist)\n![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/Ravencentric/pyanilist/release.yml)\n![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/ravencentric/pyanilist/test.yml?label=tests)\n![License](https://img.shields.io/github/license/Ravencentric/pyanilist)\n![Checked with mypy](https://www.mypy-lang.org/static/mypy_badge.svg)\n![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)\n\n</div>\n\n## Table Of Contents\n\n* [About](#about)\n* [Installation](#installation)\n* [Docs](#docs)\n* [License](#license)\n\n## About\n\n- Supports both sync and async.\n- Provides easy access to almost every field present in AniList's `Media` type.\n- Only supports querying the `Media` type\n\n## Installation\n\n`pyanilist` is available on [PyPI](https://pypi.org/project/pyanilist/), so you can simply use [pip](https://github.com/pypa/pip) to install it.\n\n```sh\npip install pyanilist\n```\n\n## Usage\n\n1. `AniList()` - Synchronous class\n - `search()` - Search a media\n\n ```py\n from pyanilist import AniList, MediaType\n\n media = AniList().search(\"Attack on Titan\", type=MediaType.ANIME)\n\n print(media.title.romaji)\n \"\"\"\n Shingeki no Kyojin\n \"\"\"\n print(media.site_url)\n \"\"\"\n https://anilist.co/anime/16498\n \"\"\"\n print(media.episodes)\n \"\"\"\n 25\n \"\"\"\n ```\n - `get()` - Get a media by it's AniList ID\n\n ```py\n from pyanilist import AniList\n\n media = AniList().get(21459)\n\n print(media.title.english)\n \"\"\"\n My Hero Academia\n \"\"\"\n print(media.site_url)\n \"\"\"\n https://anilist.co/anime/21459\n \"\"\"\n print(media.episodes)\n \"\"\"\n 13\n \"\"\"\n ```\n\n2. `AsyncAniList()` - Asynchronous class\n - `search()` - Search a media\n\n ```py\n import asyncio\n from pyanilist import AsyncAniList, MediaType\n\n media = asyncio.run(AsyncAniList().search(\"Attack on Titan\", type=MediaType.ANIME))\n\n print(media.title.romaji)\n \"\"\"\n Shingeki no Kyojin\n \"\"\"\n print(media.site_url)\n \"\"\"\n https://anilist.co/anime/16498\n \"\"\"\n print(media.episodes)\n \"\"\"\n 25\n \"\"\"\n ```\n - `get()` - Get a media by it's AniList ID\n\n ```py\n import asyncio\n from pyanilist import AsyncAniList\n \n media = asyncio.run(AsyncAniList().get(21459))\n\n print(media.title.english)\n \"\"\"\n My Hero Academia\n \"\"\"\n print(media.site_url)\n \"\"\"\n https://anilist.co/anime/21459\n \"\"\"\n print(media.episodes)\n \"\"\"\n 13\n \"\"\"\n ```\n\n## Docs\n\nCheckout the complete documentation [here](https://pyanilist.zip).\n\n## License\n\nDistributed under the [Unlicense](https://choosealicense.com/licenses/unlicense/) License. See [UNLICENSE](https://github.com/Ravencentric/pyanilist/blob/main/UNLICENSE) for more information.",
"bugtrack_url": null,
"license": "Unlicense",
"summary": "Simple AniList API wrapper to fetch media data",
"version": "0.4.1",
"project_urls": {
"Documentation": "https://pyanilist.zip",
"Homepage": "https://pyanilist.zip",
"Repository": "https://github.com/Ravencentric/pyanilist"
},
"split_keywords": [
"anilist",
" anime",
" python"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "56d0c7db30dcf992e53fe6c8df8f564ae2675e27c74feb8eb8faef92d35ec594",
"md5": "120f328778ab76a70a2bdfac8110ac93",
"sha256": "50453ab5fe8b6c1f31cd64834423dca33abac50f5243b9fd94587710693d3fd3"
},
"downloads": -1,
"filename": "pyanilist-0.4.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "120f328778ab76a70a2bdfac8110ac93",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 20802,
"upload_time": "2024-04-09T16:45:02",
"upload_time_iso_8601": "2024-04-09T16:45:02.923327Z",
"url": "https://files.pythonhosted.org/packages/56/d0/c7db30dcf992e53fe6c8df8f564ae2675e27c74feb8eb8faef92d35ec594/pyanilist-0.4.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "688c154b10843c9f9d778d8a79023ecbfbcab6f6148e38752811c40c322619f8",
"md5": "0c7aa2cb00a193aca2bc0009f74f705d",
"sha256": "2f95ae50161563dd8b8224a96a2bb40f7ae3f177ae93f1883a5f9827099ef381"
},
"downloads": -1,
"filename": "pyanilist-0.4.1.tar.gz",
"has_sig": false,
"md5_digest": "0c7aa2cb00a193aca2bc0009f74f705d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 16559,
"upload_time": "2024-04-09T16:45:05",
"upload_time_iso_8601": "2024-04-09T16:45:05.146179Z",
"url": "https://files.pythonhosted.org/packages/68/8c/154b10843c9f9d778d8a79023ecbfbcab6f6148e38752811c40c322619f8/pyanilist-0.4.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-09 16:45:05",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Ravencentric",
"github_project": "pyanilist",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "pyanilist"
}