Unofficial MangaDex API and CLI
Full documentation can be found at https://mdapi.readthedocs.io/en/latest/py-modindex/. There are no examples currently, but they will be coming soon.
Basic API usage
In absence of full examples, here's a brief example snippet:
from mdapi import MdAPI
md = MdAPI()
user = md.user.get_self()
if user is None:
print("Please login using `mdex login`")
quit()
print(f"Logged in as {user.username}")
results = md.manga.search("Murenase")
manga = next(results)
print(f"Found {manga.title}")
read_chapters = md.manga.get_read(manga)
chapters = md.manga.get_chapters(manga, order=ChapterSortOrder(chapter="asc"))
chapter = next(chapters)
print(f"First chapter: {chapter.title}")
print("Already read:", chapter.id in read_chapters)
urls = md.chapter.page_urls_for(chapter)
print("First page:")
print(next(urls))
md.chapter.mark_read(chapter)
CLI Commands
To read a chapter, the three commands needed are, in order:
mdex search [query here]mdex chapters [manga uuid]mdex read [chapter uuid]
Additionally, mdex login, mdex logout, and mdex whoami are provided.
These can be used to generate a .mdauth file without requiring a call to
md.auth.login() from code with a plaintext password. They will also be used
in future when additional functionality is added to the CLI.
Release files for mdex 0.0.14
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mdex-0.0.14.tar.gz | 15.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mdex-0.0.14-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 37.2 kB
Release files / mdex-0.0.14.tar.gz
| Download URL | mdex-0.0.14.tar.gz |
|---|---|
| Size | 15.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
43433a9372a83a413e2a2cb4e6b20e9165a749fe0b03563b7f38cdd5ff5ab896
|
|
BLAKE2b-256 checksum How to use checksums |
f04cc3d972e6a98f03f8c1cc73f5281c77123d1c36dab5772cfae782e44503b6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.0
|
Release files / mdex-0.0.14-py3-none-any.whl
| Download URL | mdex-0.0.14-py3-none-any.whl |
|---|---|
| Size | 21.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
332f560f8771bc896ca1317850d453e8c957d1a91cd8003ff07fc09f5ca6b4c7
|
|
BLAKE2b-256 checksum How to use checksums |
8449e119be679c882c0f0a8d8be83d7d61cc1ab9f4b1f5e21fbe0832e7472e10
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.0
|