Python MyAnimeList v2 API wrapper.
Project description
pyMALv2
Python API wrapper for MyAnimeList, supporting MAL version 2 api.
Note: This is a work in progress and many endpoints have not been implemented. Expect a lot of bugs.
Usage
Basic Usage:
from pyMALv2.auth import Authorization, OAuth
from pyMALv2.services import UserService
# Create an oauth client.
client = OAuth(
client_id='your_client_id',
client_secret='your_client_secret',
redirect_uri='https://your-redirect-url.com'
)
# Start the oauth flow, starts a http server to receive authorization code.
client.start_oauth2_flow(http_server=True, port=8989)
# Create an authorization object.
auth = Authorization().load_token(
access_token=client.tokens.access_token,
refresh_token=client.tokens.refresh_token,
expires_in=client.tokens.expires_in,
)
# Create service
user = UserService(auth)
# Get anime list
anime_list = user.anime_list.get()
# This returns a paginated list of the user's anime list.
Add/Update/Delete entry to user's anime or manga list:
user = UserService(auth)
user.anime_list.entry('43608').update(...)
user.manga_list.entry('43608').delete()
See examples/example1.py for an example on storing the tokens in a file so that you don't have to keep re-authorizing everytime your script runs. If you've ever worked with the google python api, it looks very similar.
Data returned from some functions are json objects deserialised to python objects analogous to the MALv2 API. So please refer to the MAL API for more information.
For more information, inspect the source code or MAL api docs. Wrapper API docs are not yet available.
Currently Implemented Endpoints
- Manga List Add/Update
- Manga List Delete
- Get User Manga List
- Anime List Add/Update
- Anime List Delete
- Get User Anime List
- OAuth2 Authentication
Contributing
Contributions are welcome. Please fork the repo and submit a pull request.
License
MIT License
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyMALv2-0.0.2.tar.gz.
File metadata
- Download URL: pyMALv2-0.0.2.tar.gz
- Upload date:
- Size: 8.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
011100cc5588b63e14f7bc2044e886a750173b2c362e91f2e4df17d1ff9a3529
|
|
| MD5 |
4632185a8c1f9d1eba43b639d8fec083
|
|
| BLAKE2b-256 |
ed346c9836b31257fc0ee0bc6730b98a66ae4df03b34192ab346e01490519485
|
File details
Details for the file pyMALv2-0.0.2-py3-none-any.whl.
File metadata
- Download URL: pyMALv2-0.0.2-py3-none-any.whl
- Upload date:
- Size: 13.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a5569704c8ba0d985c6307c20ba00fed6304f14be719bcafbf2dd73ba70518f
|
|
| MD5 |
a31456992deb178c5fd8b17f72b044c3
|
|
| BLAKE2b-256 |
95275afc3e04bf326ec35904d44e5efe783e71667439824f377d2a93dd973998
|