Skip to main content

A local MyAnimeList API

Project description

Python MAL API

pypi Version

An unofficial MyAnimeList API for Python 3.

Currently, the API does not feature any kind of rate limiting. Use the API in moderation and rate limit your queries (0.5 seconds is sufficient to my knowledge). This API uses cached webpage data to increase efficiency and save bandwidth. If you want to refresh your data, you must manually refresh the object.

The API is currently incomplete. More features are to come.

If there are any features that you wish to be supported, please raise an issue. Any feedback is also appreciated.

API Documentation

ReadTheDocs Documentation

Installation and Usage

To install the library: pip install mal-api

To import the library: from mal import *

Example

To call the API, you need to create an object.

ID Query Example

from mal import Anime

anime = Anime(1)  # Cowboy Bebop

print(anime.score)  # prints 8.82

anime.reload()  # reload object

print(anime.score)  # prints 8.81

Search Query Example

from mal import AnimeSearch

search = AnimeSearch("cowboy bebop")  # Search for "cowboy bebop"

print(search.results[0].title)  # Get title of first result

Configuration

To configure timeout (default timeout is 5 seconds):

from mal import Anime

from mal import config

config.TIMEOUT = 1  # Import level config

anime = Anime(1, timeout=1)  # Object level config

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

mal-api-0.4.0.tar.gz (9.3 kB view details)

Uploaded Source

File details

Details for the file mal-api-0.4.0.tar.gz.

File metadata

  • Download URL: mal-api-0.4.0.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0.post20200518 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3

File hashes

Hashes for mal-api-0.4.0.tar.gz
Algorithm Hash digest
SHA256 9cce31db535fc3cf268ace3b11228fb527fb031a8dc16e1df4dd373ba6e33d69
MD5 6e12daa98389846b698d1b90d0214d36
BLAKE2b-256 32684851d7cb3bedc73705ed00d035444f8c03caf6d5f5e7aec42a315f66fc6c

See more details on using hashes here.

Supported by

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