Skip to main content

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

  • Credits to Jonxslays's wom.py. Lot of stuff is copied inspired from wom.py.

License

aniwrap is licensed under MIT License.

Project details


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 hashes)

Uploaded Source

Built Distribution

aniwrap-1.0.0-py3-none-any.whl (30.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page