pymal
A Python library for interacting with MyAnimeList.
Features
- Lazy loading — data is fetched from MAL only when first accessed, then cached
- Singleton objects —
Anime(1)always returns the same object; no duplicate requests - Anime & Manga — read metadata (title, score, episodes, genres, etc.)
- Account integration — manage your anime/manga list (add, update, delete entries) through MAL's official API, or (experimental) with your browser's login cookies
- Set operations — intersect, union, diff your anime/manga lists
Quick start
from pymal.anime import Anime
anime = Anime(1) # Cowboy Bebop
print(anime.title) # fetches data on first access
print(anime.score)
print(anime.episodes)
With an account:
from pymal.account import Account
account = Account("your-username")
account.authorize("your-client-id") # the official API, once (see the tutorial)
# or: account.login_with_cookie("cookies.txt") # experimental, uses your browser's login
for entry in account.animes:
print(entry.title, entry.my_status)
Installation
From PyPI (package name pymal-ng, import name pymal):
From source:
Requirements
- Python 3.11–3.14
niquests— HTTP clientlxml— HTML parserbeautifulsoup4pillow— image objectssingleton-factory— singleton objects