# kyore/khb architecture

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

- Interactive diagram: https://gitdiagram.com/kyore/khb
- Repository: https://github.com/kyore/khb

## Overview

This is a small Python utility that downloads a Khan Bank account statement as an XLS file. Running khanbank.py loads credentials, chooses a date range, logs in to the bank website, and saves the downloaded response. The source shows these steps in one script; no README or separate domain subsystems are present.

Main entry points: [`khanbank.py`](https://github.com/kyore/khb/blob/master/khanbank.py) (Download script), [`settings.py`](https://github.com/kyore/khb/blob/master/settings.py) (Credentials), [`utils/helper.py`](https://github.com/kyore/khb/blob/master/utils/helper.py) (Date range)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_runner["Download script<br/>[khanbank.py]"]
node_config["Credentials<br/>[settings.py]"]
node_dates["Date range<br/>[helper.py]"]
node_bank["Khan Bank"]
node_export["XLS statement<br/>[khanbank.py]"]

node_runner -->|"loads credentials"| node_config
node_runner -->|"calculates dates"| node_dates
node_runner -->|"logs in and downloads"| node_bank
node_runner -->|"writes response"| node_export

click node_runner "https://github.com/kyore/khb/blob/master/khanbank.py"
click node_config "https://github.com/kyore/khb/blob/master/settings.py"
click node_dates "https://github.com/kyore/khb/blob/master/utils/helper.py"
click node_export "https://github.com/kyore/khb/blob/master/khanbank.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_runner,node_config,node_dates,node_export toneTeal
class node_bank toneIndigo
```

## Components

### Other components

- [Download script](https://github.com/kyore/khb/blob/master/khanbank.py): `khanbank.py`
- [Credentials](https://github.com/kyore/khb/blob/master/settings.py): `settings.py`
- [Date range](https://github.com/kyore/khb/blob/master/utils/helper.py): `utils/helper.py`
- **Khan Bank**
- [XLS statement](https://github.com/kyore/khb/blob/master/khanbank.py): `khanbank.py`

## Connections

- Download script → Credentials: loads credentials (evidence: `khanbank.py`)
- Download script → Date range: calculates dates (evidence: `khanbank.py`)
- Download script → Khan Bank: logs in and downloads (evidence: `khanbank.py`)
- Download script → XLS statement: writes response (evidence: `khanbank.py`)
