Skip to main content

Mangadex CLI

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mdex-0.0.12.tar.gz (14.2 kB view details)

Uploaded Source

Built Distribution

mdex-0.0.12-py3-none-any.whl (18.7 kB view details)

Uploaded Python 3

File details

Details for the file mdex-0.0.12.tar.gz.

File metadata

  • Download URL: mdex-0.0.12.tar.gz
  • Upload date:
  • Size: 14.2 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for mdex-0.0.12.tar.gz
Algorithm Hash digest
SHA256 5681006bcc4f46c81b629cb46333a57a9969d4bd75b2f9c2c178c952594a6778
MD5 94142cecb6bab287fe3febf609698a44
BLAKE2b-256 1221e271bcdd0bdc38ff6b9d5d85d1e377f66d2497cb566cf03fe526f8ebbebe

See more details on using hashes here.

File details

Details for the file mdex-0.0.12-py3-none-any.whl.

File metadata

  • Download URL: mdex-0.0.12-py3-none-any.whl
  • Upload date:
  • Size: 18.7 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for mdex-0.0.12-py3-none-any.whl
Algorithm Hash digest
SHA256 426ede45f3e3accc778aac699c13dd8054f055fe159b5dab916c3aa9d8f5df60
MD5 b000ed15005a2aaecdbd9aaa21c3a9df
BLAKE2b-256 ede7ce10b5c0f5752da97fbe088578d4f6831d95030e881d0f0fa87f75fc0dc4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page