A local MyAnimeList API
Project description
Python MAL API
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
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file mal-api-0.5.3.tar.gz
.
File metadata
- Download URL: mal-api-0.5.3.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 406df47769bbea10176d97c2136fe0013c2a2c6161408442745341f60626fa78 |
|
MD5 | 61696b4efd2204ca612555da403886d0 |
|
BLAKE2b-256 | 47206ea09874fbed7109010a22c0c48ec9f3fb066517154ed77aa0436ea36849 |
File details
Details for the file mal_api-0.5.3-py3-none-any.whl
.
File metadata
- Download URL: mal_api-0.5.3-py3-none-any.whl
- Upload date:
- Size: 12.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 950fb8cf7ac5516f46fe0d9a40779d74eed711eb90a7d25ccf379c710bb6f887 |
|
MD5 | 1beeaeed743779152d4e1ea836b28c26 |
|
BLAKE2b-256 | 0903aef8bb666a67f7fe488ad9c41907f0f829e437ba9162709f9dcbe857c3bd |