An Asynchronous API wrapper for My Anime List API.
Project description
aniwrap
An asynchronous wrapper for the MyAnimeList V2 API.
Aniwrap aims to make it easier to interact with MAL API.
Disclaimer
The library is still in Alpha, and the features may change at any time.
Installation
Python version 3.10 or greater is required to use aniwrap.
pip install aniwrap
Features
- Search anime and manga by name
- Fetch anime and manga details by ID
- Fetch seasonal anime
- Fetch anime and manga rankings
- Fetch forum boards and discussions
- Fetch and manipulate user's anime and manga list using user's access token
Usage
- Example of using anime and manga related actions
from aniwrap import Client
client = Client("your MAL client Id")
anime_search_result = await client.anime.search_anime("attack on titan")
manga_search_result = await client.manga.search_manga("attack on titan")
if anime_search_result.is_success:
anime_results = anime_search_result.value
if anime_search_result.is_error:
error = anime_search_result.error
if manga_search_result.is_success:
manga_results = manga_search_result.value
if manga_search_result.is_error:
error = manga_search_result.error
await client.close()
- Example of using user related actions
from aniwrap import UserClient
user_client = UserClient("user's access token")
anime_list_result = await user_client.user.get_anime_list("user's username")
manga_list_result = await user_client.user.get_manga_list("user's username")
if anime_list_result.is_success:
anime_list = anime_list_result.value
if anime_list_result.is_error:
error = anime_list_result.error
if manga_list_result.is_success:
manga_list = manga_list_result.value
if manga_list_result.is_error:
error = manga_list_result.error
You can find information on generating Client Id and user's access token used in the above examples on MAL documentation.
Issues
If you're facing any problems with the library, please open an issue here.
Credits
License
aniwrap is licensed under MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
aniwrap-1.0.0.tar.gz
(19.8 kB
view details)
Built Distribution
aniwrap-1.0.0-py3-none-any.whl
(30.6 kB
view details)
File details
Details for the file aniwrap-1.0.0.tar.gz
.
File metadata
- Download URL: aniwrap-1.0.0.tar.gz
- Upload date:
- Size: 19.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.2 CPython/3.11.0 Linux/5.15.0-1037-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4aff039191d017cd45bf64b82229d2a2c72cb40050ccc9c31e6ffcffac6cf9e6 |
|
MD5 | 621bf932db500349957f4c037b00a35a |
|
BLAKE2b-256 | 8d7d86a35becf464d2865c7bd74981a8e71e35be2a127576fbb91a87794327fd |
File details
Details for the file aniwrap-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: aniwrap-1.0.0-py3-none-any.whl
- Upload date:
- Size: 30.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.2 CPython/3.11.0 Linux/5.15.0-1037-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 01744d22e96f486484f68d109c09de0fe42a1bd26ca5850ae84d8d700a2b82f6 |
|
MD5 | 25a7994029008849562e740f0d6a70b7 |
|
BLAKE2b-256 | 21302d939fa1aa5cc8c2aed3a128294e6c3a52a089a22d9103b2b7010629a189 |