An API wrapper for MangaDex.
Project description
MangaDex.py
An easy to use, MangaDex API Wrapper using Requests - aiming to be simple and efficient.
Installation
pip install --upgrade MangaDex.py
Quick start
Example
Logging in and getting the latest chapter from a manga:
# Import the MangaDexPy library
import MangaDexPy
cli = MangaDexPy.MangaDex()
cli.login("username", "password")
# Get manga with id 24724. Setting full to True allows retrieving the list of chapters associated to this Manga
manga = cli.get_manga(24724, full=True)
print(manga.title + "'s latest volume:")
print(manga.chapters[0].volume)
print(manga.title + "'s latest chapter:")
print(manga.chapters[0].chapter)
Here's the terminal output:
You can find more examples on this page
Explanation
cli = MangaDexPy.MangaDex()
returns the client object used to make calls.
cli.login(u ,p)
logs in to MangaDex using credentials stored in variables.
manga = cli.get_manga(24724, full=True)
returns a Manga
object.
This Manga object has a .chapters
property, which returns a List of PartialChapter
. A partial Chapter is a chapter with no information about its pages nor the server it is server from, unlike Chapter
.
We could retrieve the entire Chapter
using cli.get_chapter(manga.chapters[0].id)
, but this isn't needed as we're just requesting volume
and chapter
properties of this chapter, which is included in the PartialChapter
.
Documentation
The full API documentation is available in this repository's wiki.
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
Hashes for MangaDex.py-1.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad03b90398e6740dc1ced554e2e4182735cfb3ceafb8188c3c49b6864dcdd3f8 |
|
MD5 | a620eb6d795787c40a61dd28672fd542 |
|
BLAKE2b-256 | 9e9c6e1b3a96d08b91c2202fdd0a6ff00fc27dc0f35b94f0917fc0a96a7216e4 |