Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rlalpha49/anilinkpy
API wrapper for AniManga sites such as Anilist, MyAnimeList, Kitsu.
https://github.com/rlalpha49/anilinkpy
anilist anilist-api anilist-api-wrapper kitsu kitsu-api kitsu-api-wrapper myanimelist myanimelist-api myanimelist-api-wrapper pypi pypi-package python
Last synced: 3 months ago
JSON representation
API wrapper for AniManga sites such as Anilist, MyAnimeList, Kitsu.
- Host: GitHub
- URL: https://github.com/rlalpha49/anilinkpy
- Owner: RLAlpha49
- License: mit
- Created: 2024-05-09T05:03:10.000Z (9 months ago)
- Default Branch: master
- Last Pushed: 2024-09-17T17:02:30.000Z (5 months ago)
- Last Synced: 2024-09-17T20:56:33.219Z (5 months ago)
- Topics: anilist, anilist-api, anilist-api-wrapper, kitsu, kitsu-api, kitsu-api-wrapper, myanimelist, myanimelist-api, myanimelist-api-wrapper, pypi, pypi-package, python
- Language: Python
- Homepage: https://rlalpha49.github.io/AniLinkPy/
- Size: 2.44 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AniLinkPy Documentation
AniLinkPy is a Python library that provides an interface to interact with anime/manga APIs like AniList, MyAnimeList, and Kitsu. The library is structured as follows:
## Main Components
- `AniLink`: The main class that initializes connections to different APIs
- `AniList`: Class for interacting with the AniList API
- `Query`: Methods for querying data
- `Mutation`: Methods for mutating data
- `CustomRequest`: For sending custom queries/mutations## Key Features
- Query methods for retrieving data on users, media, characters, etc.
- Mutation methods for updating data
- Page query methods for paginated results
- Custom query/mutation support
- Error handling for API errors## Usage
Basic usage:
```python
from AniLinkPy import AniLinkanilink = AniLink(auth_token)
# Query a user
user = anilink.anilist.query.user({'id': 123})# Custom query
custom_query = """
query {
Viewer {
id
}
}
"""
result = anilink.anilist.custom(custom_query)
```The library handles authentication, request sending, and response parsing. It provides a clean interface to interact with anime/manga APIs without having to deal with the low-level details.
## Installation
AniLinkPy can be installed via pip:
```
pip install AniLinkPy
```## Error Handling
The library throws exceptions for API errors which can be caught and handled:
```python
try:
user = anilink.anilist.query.user({'id': 123})
except Exception as error:
print(error)
```Overall, AniLinkPy aims to simplify interaction with anime/manga APIs by providing an intuitive Python interface.