Utagai / spice

spice is a pure Python API that wraps around MAL's Official API and makes it much, much better.
MIT License
28 stars 7 forks source link

Build Status

Note: The Official MAL API has been taken down by MAL itself due to security concerns and is therefore unavailable for use. This means that this API (which is a wrapper) will not work! Please check MyAnimeList for more information! In particular, this link should give you more information on what is going on.

An Introduction

The Official MyAnimeList API needs lots of work and is pretty annoying to use. Here are some of the many issues:

Work and/or further development on it seems like a lost cause, since the developer(s) have far more pressing concerns with the site.

This API aims to provide an easy to use Python API that wraps around MAL's REST-API so that you don't have to experience any headaches.

Name inspired by Horo/Holo from Spice and Wolf.

API inspired by other attempts (which made their own REST API wrapper, while this one uses a pure Python implementation), such as crobert22's Railgun and chuyeow's myanimelist-api.

Install

$ pip install spice_api

Documentation

Authorization:

Searching:

Updating your list:

  1. create blank Anime or Manga object anime = spice.get_blank(spice.get_medium('anime'))
  2. Fill in fields like:
    saw_data.episodes = 10 #you've watched 10 eps
    saw_data.status = spice_api.get_status('watching') #you're still watching
    saw_data.score = 9 #your rating
    saw_data.tags = ['Holo is the best.'] #tags
  3. Push the update with spice_api.update(saw_data, saw_id, spice.get_medium('anime'), creds)

Getting lists

Referencing a List object is as easy as spice_api.get_list(spice.get_medium('anime'), 'username', creds)

Anime Object The Anime object has a number of attributes:

Manga Object

NOTE: Novels are also treated as manga.

The manga object has similar attributes:

List object This object encapsulates an anime or manga list. It has attributes :

This object also includes some probably useless but potentially useful methods to analyze lists:

NOTE: Raises ValueError if lists are of different medium type.

What's Left