# hect0x7/jmcomic-crawler-python architecture

> Architecture diagram of the GitHub repository hect0x7/jmcomic-crawler-python, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/hect0x7/jmcomic-crawler-python
- Repository: https://github.com/hect0x7/jmcomic-crawler-python

## Overview

JMComic is a Python API and downloader for retrieving comic albums, chapters, and processed images from JMComic’s web and mobile interfaces. The main workflow is initiated through the Python API or CLI, configured by an Option, then executed by a synchronous or asynchronous downloader using a client. Clients also expose documented search, account, comments, ranking, and favorites capabilities. Entities, shared toolkit utilities, task context, and plugins/features support the runtime. Some feature links are documented only at the product level; unsampled implementation details are not inferred.

Main entry points: [`src/jmcomic/jm_downloader.py`](https://github.com/hect0x7/jmcomic-crawler-python/blob/master/src/jmcomic/jm_downloader.py) (Sync downloader), [`src/jmcomic/api.py`](https://github.com/hect0x7/jmcomic-crawler-python/blob/master/src/jmcomic/api.py) (Python API), [`src/jmcomic/jm_async_downloader.py`](https://github.com/hect0x7/jmcomic-crawler-python/blob/master/src/jmcomic/jm_async_downloader.py) (Async downloader), [`src/jmcomic/jm_client_impl.py`](https://github.com/hect0x7/jmcomic-crawler-python/blob/master/src/jmcomic/jm_client_impl.py) (Sync clients)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User entry points"]
  node_cli["CLI commands<br/>[cli.py]"]
  node_api["Python API<br/>[api.py]"]
end

subgraph group_download["Download execution"]
  node_syncdown["Sync downloader<br/>[jm_downloader.py]"]
  node_asyncdown["Async downloader"]
end

subgraph group_access["JM access"]
  node_interface["Client interface"]
  node_syncclient["Sync clients<br/>[jm_client_impl.py]"]
  node_asyncclient["Async client<br/>[jm_async_client.py]"]
end

subgraph group_support["Configuration and models"]
  node_option["Download options<br/>[jm_option.py]"]
  node_entities["Comic entities<br/>[jm_entity.py]"]
  node_config["Runtime configuration<br/>[jm_config.py]"]
  node_toolkit["Parsing utilities<br/>[jm_toolkit.py]"]
  node_exceptions["Error handling<br/>[jm_exception.py]"]
end

subgraph group_extension["Extensions and context"]
  node_plugins["Plugins<br/>[jm_plugin.py]"]
  node_features["Download features<br/>[jm_feature.py]"]
  node_context["Task context<br/>[jm_task_context.py]"]
end

node_user(("User"))
node_jm{{"JMComic services"}}

node_user -->|"runs commands"| node_cli
node_user -->|"calls API"| node_api
node_cli -->|"dispatches downloads"| node_api
node_api -->|"creates options"| node_option
node_api -->|"invokes downloads"| node_syncdown
node_api -->|"invokes async downloads"| node_asyncdown
node_syncdown -->|"reads settings"| node_option
node_asyncdown -->|"reuses lifecycle"| node_syncdown
node_asyncdown -->|"creates client"| node_option
node_syncdown -.->|"requests comic data"| node_syncclient
node_asyncdown -->|"requests comic data"| node_asyncclient
node_syncclient -->|"implements methods"| node_interface
node_asyncclient -->|"implements methods"| node_interface
node_syncclient -->|"fetches comic data"| node_jm
node_asyncclient -->|"fetches comic data"| node_jm
node_syncclient -.->|"returns parsed entities"| node_entities
node_asyncclient -->|"returns parsed entities"| node_entities
node_option -->|"selects client"| node_syncclient
node_option -->|"configures plugins"| node_plugins
node_syncdown -->|"runs features"| node_features
node_plugins -->|"hooks downloads"| node_syncdown
node_plugins -->|"hooks async downloads"| node_asyncdown
node_api -->|"sets task context"| node_context
node_syncdown -->|"tracks tasks"| node_context
node_asyncdown -->|"binds worker context"| node_context
node_syncclient -->|"uses utilities"| node_toolkit
node_entities -->|"uses constants"| node_config
node_toolkit -->|"raises errors"| node_exceptions

click node_cli "https://github.com/hect0x7/jmcomic-crawler-python/blob/master/src/jmcomic/cli.py"
click node_api "https://github.com/hect0x7/jmcomic-crawler-python/blob/master/src/jmcomic/api.py"
click node_option "https://github.com/hect0x7/jmcomic-crawler-python/blob/master/src/jmcomic/jm_option.py"
click node_syncdown "https://github.com/hect0x7/jmcomic-crawler-python/blob/master/src/jmcomic/jm_downloader.py"
click node_asyncdown "https://github.com/hect0x7/jmcomic-crawler-python/blob/master/src/jmcomic/jm_async_downloader.py"
click node_interface "https://github.com/hect0x7/jmcomic-crawler-python/blob/master/src/jmcomic/jm_client_interface.py"
click node_syncclient "https://github.com/hect0x7/jmcomic-crawler-python/blob/master/src/jmcomic/jm_client_impl.py"
click node_asyncclient "https://github.com/hect0x7/jmcomic-crawler-python/blob/master/src/jmcomic/jm_async_client.py"
click node_entities "https://github.com/hect0x7/jmcomic-crawler-python/blob/master/src/jmcomic/jm_entity.py"
click node_config "https://github.com/hect0x7/jmcomic-crawler-python/blob/master/src/jmcomic/jm_config.py"
click node_toolkit "https://github.com/hect0x7/jmcomic-crawler-python/blob/master/src/jmcomic/jm_toolkit.py"
click node_plugins "https://github.com/hect0x7/jmcomic-crawler-python/blob/master/src/jmcomic/jm_plugin.py"
click node_features "https://github.com/hect0x7/jmcomic-crawler-python/blob/master/src/jmcomic/jm_feature.py"
click node_context "https://github.com/hect0x7/jmcomic-crawler-python/blob/master/src/jmcomic/jm_task_context.py"
click node_exceptions "https://github.com/hect0x7/jmcomic-crawler-python/blob/master/src/jmcomic/jm_exception.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cli,node_api,node_user toneBlue
class node_syncdown,node_asyncdown toneAmber
class node_interface,node_syncclient,node_asyncclient toneMint
class node_option,node_entities,node_config,node_toolkit,node_exceptions toneRose
class node_plugins,node_features,node_context,node_jm toneIndigo
```

## Components

### User entry points

- [CLI commands](https://github.com/hect0x7/jmcomic-crawler-python/blob/master/src/jmcomic/cli.py): `src/jmcomic/cli.py`
- [Python API](https://github.com/hect0x7/jmcomic-crawler-python/blob/master/src/jmcomic/api.py): `src/jmcomic/api.py`

### Download execution

- [Sync downloader](https://github.com/hect0x7/jmcomic-crawler-python/blob/master/src/jmcomic/jm_downloader.py): `src/jmcomic/jm_downloader.py`
- [Async downloader](https://github.com/hect0x7/jmcomic-crawler-python/blob/master/src/jmcomic/jm_async_downloader.py): `src/jmcomic/jm_async_downloader.py`

### JM access

- [Client interface](https://github.com/hect0x7/jmcomic-crawler-python/blob/master/src/jmcomic/jm_client_interface.py): `src/jmcomic/jm_client_interface.py`
- [Sync clients](https://github.com/hect0x7/jmcomic-crawler-python/blob/master/src/jmcomic/jm_client_impl.py): `src/jmcomic/jm_client_impl.py`
- [Async client](https://github.com/hect0x7/jmcomic-crawler-python/blob/master/src/jmcomic/jm_async_client.py): `src/jmcomic/jm_async_client.py`

### Configuration and models

- [Download options](https://github.com/hect0x7/jmcomic-crawler-python/blob/master/src/jmcomic/jm_option.py): `src/jmcomic/jm_option.py`
- [Comic entities](https://github.com/hect0x7/jmcomic-crawler-python/blob/master/src/jmcomic/jm_entity.py): `src/jmcomic/jm_entity.py`
- [Runtime configuration](https://github.com/hect0x7/jmcomic-crawler-python/blob/master/src/jmcomic/jm_config.py): `src/jmcomic/jm_config.py`
- [Parsing utilities](https://github.com/hect0x7/jmcomic-crawler-python/blob/master/src/jmcomic/jm_toolkit.py): `src/jmcomic/jm_toolkit.py`
- [Error handling](https://github.com/hect0x7/jmcomic-crawler-python/blob/master/src/jmcomic/jm_exception.py): `src/jmcomic/jm_exception.py`

### Extensions and context

- [Plugins](https://github.com/hect0x7/jmcomic-crawler-python/blob/master/src/jmcomic/jm_plugin.py): `src/jmcomic/jm_plugin.py`
- [Download features](https://github.com/hect0x7/jmcomic-crawler-python/blob/master/src/jmcomic/jm_feature.py): `src/jmcomic/jm_feature.py`
- [Task context](https://github.com/hect0x7/jmcomic-crawler-python/blob/master/src/jmcomic/jm_task_context.py): `src/jmcomic/jm_task_context.py`

### Other components

- **User**
- **JMComic services**

## Connections

- User → CLI commands: runs commands (evidence: `README.md`)
- User → Python API: calls API (evidence: `README.md`)
- CLI commands → Python API: dispatches downloads (evidence: `src/jmcomic/cli.py`)
- Python API → Download options: creates options (evidence: `src/jmcomic/api.py`)
- Python API → Sync downloader: invokes downloads (evidence: `src/jmcomic/api.py`)
- Python API → Async downloader: invokes async downloads (evidence: `src/jmcomic/api.py`)
- Sync downloader → Download options: reads settings (evidence: `src/jmcomic/jm_downloader.py`)
- Async downloader → Sync downloader: reuses lifecycle (evidence: `src/jmcomic/jm_async_downloader.py`)
- Async downloader → Download options: creates client (evidence: `src/jmcomic/jm_async_downloader.py`)
- Sync downloader → Sync clients: requests comic data
- Async downloader → Async client: requests comic data (evidence: `src/jmcomic/jm_async_downloader.py`)
- Sync clients → Client interface: implements methods (evidence: `src/jmcomic/jm_client_impl.py`)
- Async client → Client interface: implements methods (evidence: `src/jmcomic/jm_async_client.py`)
- Sync clients → JMComic services: fetches comic data (evidence: `README.md`)
- Async client → JMComic services: fetches comic data (evidence: `README.md`)
- Sync clients → Comic entities: returns parsed entities
- Async client → Comic entities: returns parsed entities (evidence: `src/jmcomic/jm_async_client.py`)
- Download options → Sync clients: selects client (evidence: `src/jmcomic/jm_option.py`)
- Download options → Plugins: configures plugins (evidence: `src/jmcomic/jm_option.py`)
- Sync downloader → Download features: runs features (evidence: `src/jmcomic/jm_downloader.py`)
- Plugins → Sync downloader: hooks downloads (evidence: `src/jmcomic/jm_plugin.py`)
- Plugins → Async downloader: hooks async downloads (evidence: `src/jmcomic/jm_plugin.py`)
- Python API → Task context: sets task context (evidence: `src/jmcomic/api.py`)
- Sync downloader → Task context: tracks tasks (evidence: `src/jmcomic/jm_downloader.py`)
- Async downloader → Task context: binds worker context (evidence: `src/jmcomic/jm_async_downloader.py`)
- Sync clients → Parsing utilities: uses utilities (evidence: `src/jmcomic/jm_client_impl.py`)
- Comic entities → Runtime configuration: uses constants (evidence: `src/jmcomic/jm_entity.py`)
- Parsing utilities → Error handling: raises errors (evidence: `src/jmcomic/jm_toolkit.py`)
