# gto76/python-cheatsheet architecture

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

- Interactive diagram: https://gitdiagram.com/gto76/python-cheatsheet
- Repository: https://github.com/gto76/python-cheatsheet

## Overview

This repository is a Python reference cheatsheet published as a web page, with generated COVID/economic charts and a PDF-oriented link-removal script. The principal reader workflow is to browse the topic-organized cheatsheet, use its linked table of contents, and consult code examples; the README documents eight broad subject areas. The excerpts show page generation and chart refresh mechanics, but do not establish how all listed web assets are loaded, nor the PDF production workflow, so those links are omitted.

Main entry points: [`index.html`](https://github.com/gto76/python-cheatsheet/blob/main/index.html) (Rendered page), [`parse.js`](https://github.com/gto76/python-cheatsheet/blob/main/parse.js) (Page generator), [`web/update_plots.py`](https://github.com/gto76/python-cheatsheet/blob/main/web/update_plots.py) (Chart refresher), [`web/script_2.js`](https://github.com/gto76/python-cheatsheet/blob/main/web/script_2.js) (Responsive TOC)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_reference["Cheatsheet content"]
  node_collections["Collections<br/>[README.md]"]
  node_types["Data types<br/>[README.md]"]
  node_syntax["Syntax rules<br/>[README.md]"]
  node_system["System calls<br/>[README.md]"]
  node_formats["Data formats<br/>[README.md]"]
  node_misc["Misc topics<br/>[README.md]"]
  node_packages["Pip packages<br/>[README.md]"]
  node_multimedia["Multimedia<br/>[README.md]"]
end

subgraph group_web["Web presentation"]
  node_generator["Page generator<br/>[parse.js]"]
  node_template["HTML template<br/>[template.html]"]
  node_page["Rendered page<br/>[index.html]"]
  node_toc["Responsive TOC<br/>[script_2.js]"]
end

subgraph group_charts["Chart data and refresh"]
  node_casechart["Cases chart<br/>[covid_cases.js]"]
  node_deathchart["Deaths chart<br/>[covid_deaths.js]"]
  node_refresh["Chart refresher<br/>[update_plots.py]"]
end

subgraph group_pdf["PDF support"]
  node_linktool["Link removal<br/>[remove_links.py]"]
end

node_reader(("Reader"))

node_reader -->|"browses"| node_page
node_generator -->|"writes"| node_page
node_generator -->|"reads"| node_template
node_generator -->|"converts"| node_collections
node_toc -.->|"updates navigation"| node_page
node_refresh -->|"writes chart"| node_casechart
node_refresh -->|"writes chart"| node_deathchart
node_linktool -->|"rewrites links"| node_page

click node_collections "https://github.com/gto76/python-cheatsheet/blob/main/README.md"
click node_types "https://github.com/gto76/python-cheatsheet/blob/main/README.md"
click node_syntax "https://github.com/gto76/python-cheatsheet/blob/main/README.md"
click node_system "https://github.com/gto76/python-cheatsheet/blob/main/README.md"
click node_formats "https://github.com/gto76/python-cheatsheet/blob/main/README.md"
click node_misc "https://github.com/gto76/python-cheatsheet/blob/main/README.md"
click node_packages "https://github.com/gto76/python-cheatsheet/blob/main/README.md"
click node_multimedia "https://github.com/gto76/python-cheatsheet/blob/main/README.md"
click node_generator "https://github.com/gto76/python-cheatsheet/blob/main/parse.js"
click node_template "https://github.com/gto76/python-cheatsheet/blob/main/web/template.html"
click node_page "https://github.com/gto76/python-cheatsheet/blob/main/index.html"
click node_toc "https://github.com/gto76/python-cheatsheet/blob/main/web/script_2.js"
click node_casechart "https://github.com/gto76/python-cheatsheet/blob/main/web/covid_cases.js"
click node_deathchart "https://github.com/gto76/python-cheatsheet/blob/main/web/covid_deaths.js"
click node_refresh "https://github.com/gto76/python-cheatsheet/blob/main/web/update_plots.py"
click node_linktool "https://github.com/gto76/python-cheatsheet/blob/main/pdf/remove_links.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_collections,node_types,node_syntax,node_system,node_formats,node_misc,node_packages,node_multimedia toneBlue
class node_generator,node_template,node_page,node_toc toneAmber
class node_casechart,node_deathchart,node_refresh toneMint
class node_linktool toneRose
class node_reader toneIndigo
```

## Components

### Cheatsheet content

- [Collections](https://github.com/gto76/python-cheatsheet/blob/main/README.md): `README.md`
- [Data types](https://github.com/gto76/python-cheatsheet/blob/main/README.md): `README.md`
- [Syntax rules](https://github.com/gto76/python-cheatsheet/blob/main/README.md): `README.md`
- [System calls](https://github.com/gto76/python-cheatsheet/blob/main/README.md): `README.md`
- [Data formats](https://github.com/gto76/python-cheatsheet/blob/main/README.md): `README.md`
- [Misc topics](https://github.com/gto76/python-cheatsheet/blob/main/README.md): `README.md`
- [Pip packages](https://github.com/gto76/python-cheatsheet/blob/main/README.md): `README.md`
- [Multimedia](https://github.com/gto76/python-cheatsheet/blob/main/README.md): `README.md`

### Web presentation

- [Page generator](https://github.com/gto76/python-cheatsheet/blob/main/parse.js): `parse.js`
- [HTML template](https://github.com/gto76/python-cheatsheet/blob/main/web/template.html): `web/template.html`
- [Rendered page](https://github.com/gto76/python-cheatsheet/blob/main/index.html): `index.html`
- [Responsive TOC](https://github.com/gto76/python-cheatsheet/blob/main/web/script_2.js): `web/script_2.js`

### Chart data and refresh

- [Cases chart](https://github.com/gto76/python-cheatsheet/blob/main/web/covid_cases.js): `web/covid_cases.js`
- [Deaths chart](https://github.com/gto76/python-cheatsheet/blob/main/web/covid_deaths.js): `web/covid_deaths.js`
- [Chart refresher](https://github.com/gto76/python-cheatsheet/blob/main/web/update_plots.py): `web/update_plots.py`

### PDF support

- [Link removal](https://github.com/gto76/python-cheatsheet/blob/main/pdf/remove_links.py): `pdf/remove_links.py`

### Other components

- **Reader**

## Connections

- Reader → Rendered page: browses (evidence: `README.md`)
- Page generator → Rendered page: writes (evidence: `parse.js`)
- Page generator → HTML template: reads (evidence: `parse.js`)
- Page generator → Collections: converts (evidence: `parse.js`)
- Responsive TOC → Rendered page: updates navigation
- Chart refresher → Cases chart: writes chart (evidence: `web/update_plots.py`)
- Chart refresher → Deaths chart: writes chart (evidence: `web/update_plots.py`)
- Link removal → Rendered page: rewrites links (evidence: `pdf/remove_links.py`)
