Skip to main content

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 -U 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

Metadata

Release files for mal-api 0.5.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mal-api 0.5.3
File Size Uploaded
mal-api-0.5.3.tar.gz 9.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mal-api 0.5.3
File Interpreter ABI Platform
mal_api-0.5.3-py3-none-any.whl Python 3 none any Details

Total release size: 22.0 kB

Release files / mal-api-0.5.3.tar.gz

Download URL mal-api-0.5.3.tar.gz
Size 9.5 kB
Tags Source
SHA-256 checksum
How to use checksums
406df47769bbea10176d97c2136fe0013c2a2c6161408442745341f60626fa78
BLAKE2b-256 checksum
How to use checksums
47206ea09874fbed7109010a22c0c48ec9f3fb066517154ed77aa0436ea36849
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.0

Release files / mal_api-0.5.3-py3-none-any.whl

Download URL mal_api-0.5.3-py3-none-any.whl
Size 12.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
950fb8cf7ac5516f46fe0d9a40779d74eed711eb90a7d25ccf379c710bb6f887
BLAKE2b-256 checksum
How to use checksums
0903aef8bb666a67f7fe488ad9c41907f0f829e437ba9162709f9dcbe857c3bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.0

Release history Release notifications | RSS feed

This release

0.5.3 This release

2 release files

0.5.2

1 release file

0.5.1

1 release file

0.5.0

1 release file

0.4.0

1 release file

0.3.8

1 release file

0.3.7

1 release file

0.3.6

1 release file

0.3.5

1 release file

0.3.4

1 release file

0.3.3

1 release file

0.3.2

1 release file

0.3.1

2 release files

0.3.0

2 release files

0.2.3

2 release files

0.2.2

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.1

1 release file

0.1.0

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page