Loading search…

Explain with AI
Edit this page

API Reference

Last updated

Find Python modules for data models, scraping, downloads, archives, configuration, and errors.

On this page

Use this index to locate comic_dl’s public modules. Function signatures and behavior are documented in the docstrings under src/comic_dl/. For the end-to-end flow, start with Architecture.

Data contracts

comic_dl.models — gallery, chapter, and image data models.

Download engine

comic_dl.downloader — asynchronous download engine.

Archive creation

comic_dl.archiver — CBZ/ZIP/CBT packing.

Scraper contract and registry

Plugin authors should start with Writing a Plugin. These modules provide the scraper contract and source discovery:

  • comic_dl.scrapers.base — BaseScraper contract.
  • comic_dl.scrapers.registry — plugin loader.
  • comic_dl.scrapers.generic — fallback HTML scraper.

URL validation and sanitization

comic_dl.utils — URL validation and sanitization helpers.

Configuration loading

comic_dl.config — config-file discovery, precedence (CLI flag > config.toml > built-in default), per-source overrides, and the resolved-effective-config view used by comic-dl config show|list. Includes the download-toggles ([download] generic) and runtime overrides (set_runtime_download / download_setting / generic_enabled).

Error codes and exit status

comic_dl.errors — exit codes and error hierarchy.