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

await  user_client.close()

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.1.tar.gz (19.8 kB view details)

Uploaded Source

Built Distribution

aniwrap-1.0.1-py3-none-any.whl (30.7 kB view details)

Uploaded Python 3

File details

Details for the file aniwrap-1.0.1.tar.gz.

File metadata

  • Download URL: aniwrap-1.0.1.tar.gz
  • Upload date:
  • Size: 19.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.0 CPython/3.11.0 Linux/5.15.0-1037-azure

File hashes

Hashes for aniwrap-1.0.1.tar.gz
Algorithm Hash digest
SHA256 a0fd80cd5b9a8ef3af88f93ba40c418924515653a778dc48789b025edaff4c1d
MD5 60b8e8db3d16b053af6e01550131f77c
BLAKE2b-256 b23e9162d1e68850f7cc04a9866438a132e23a0f590a6973c7f12c9e2506fb77

See more details on using hashes here.

File details

Details for the file aniwrap-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: aniwrap-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 30.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.0 CPython/3.11.0 Linux/5.15.0-1037-azure

File hashes

Hashes for aniwrap-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b7a4382eef4982458cf651eb6399829791bbd31d16d36cf5649b3a4af53cd910
MD5 b3cbdf1bca22a75ad0af1438222558ab
BLAKE2b-256 489571f5d5ad4d0512dab24e3abfa7c0aa0712e14ac06569da7a2dd80a4d0a95

See more details on using hashes here.

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