Skip to main content

pymal

Python access to MyAnimeList data. Objects are lazy-loading: MAL is only contacted when you first access a property.

Docs: https://varyg1001.github.io/pymal/

Install

The package is published as pymal-ng; the import name is pymal.

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

Requires Python 3.11–3.14.

Quick start

from pymal.anime import Anime

a = Anime(52991)          # no network call yet
print(a.title)            # first access fetches from MAL
print(a.score, a.episodes)
print(a.genres)

With an account (private lists, add/update/delete entries). MAL's website login has a captcha, so pymal can't log in with a password; there are two ways:

from pymal.account import Account

account = Account("your-username")

# 1. The official API (stable; everything works). Create an app once at
#    https://myanimelist.net/apiconfig and log in once; tokens are saved and refreshed.
account.authorize("your-client-id")

# 2. Experimental: the cookies of your browser (status, score and progress only).
account.login_with_cookie("cookies.txt")     # an export of your browser's cookies

for entry in account.animes:
    print(entry.title, entry.my_score)
entry = Anime(1887).add(account)             # add to the list (Plan to Watch)
entry.my_score = 9
entry.update()

Anime, manga, search, seasons and anyone's public list need no login. See the account docs for the details and limits.

Also available: Manga, Seasons/Season, and search via SearchAnimesProvider / SearchMangasProvider. See the tutorial and API reference.

Development

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

uv run pytest                                     # offline tests; live account tests skip
MAL_USERNAME=you MAL_SESSIONID=cookies.txt uv run pytest      # include live account tests
# or MAL_CLIENT_ID=… MAL_ACCESS_TOKEN=…  (see docs/testing.md)

See docs/changelog.md for release history.

Credits

Originally created by tomer gelber and Aur Saraf (pymal-developers/pymal).

The 1.0 revival was done mostly with AI, to fix breakage from outdated dependencies and MAL's HTML changes.

License

BSD 3-Clause — see LICENSE.

Metadata

Release files for pymal-ng 2.0.1

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

Source distribution (sdist)

Source distribution for pymal-ng 2.0.1
File Size Uploaded Provenance Actions
pymal_ng-2.0.1.tar.gz 36.6 kB With provenance Details for pymal_ng-2.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pymal-ng 2.0.1
File Interpreter ABI Platform Actions
pymal_ng-2.0.1-py3-none-any.whl Python 3 none any Details for pymal_ng-2.0.1-py3-none-any.whl

Total release size: 87.6 kB

Release files / pymal_ng-2.0.1.tar.gz

Download URL pymal_ng-2.0.1.tar.gz
Size 36.6 kB
Tags Source
SHA-256 checksum
How to use checksums
f57210da39eb259aeea6f7addcce56c8ad4ee42e0a52c04d7686d539568c7d32
BLAKE2b-256 checksum
How to use checksums
8c356e7342882fb6a650a26084a5d1b1f73c38a3a4d37df3366dfab1f1548abd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.

Transparency log

Release files / pymal_ng-2.0.1-py3-none-any.whl

Download URL pymal_ng-2.0.1-py3-none-any.whl
Size 51.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f761c85fb198b5f6d4705e4e7323049c2a033025f604ae437920ed7dcf9ceee6
BLAKE2b-256 checksum
How to use checksums
1446c279f4d8b29494905bd31fe55293aedac81627db77db5ca7eccf75635d37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.

Transparency log

Security for pymal-ng 2.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pymal_ng-2.0.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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