Skip to content

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):

pip install pymal-ng      # or: uv add pymal-ng

From source:

git clone https://github.com/varyg1001/pymal
cd pymal
uv sync

Requirements