An API wrapper for the MangaDexAPIv5.
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-2.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 041b3569085129d6243612516479d66ef6a7844b478459d154b2e3db6d7247b9 |
|
MD5 | 3f6e3d42f9909fe1df5e3abe44266141 |
|
BLAKE2b-256 | 6609195c8aa60680b42e9fda94358939aaf9c16ec13d03c47d94feaf4c2d8a9d |