# hasn-tech/python_projects architecture

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

- Interactive diagram: https://gitdiagram.com/hasn-tech/python_projects
- Repository: https://github.com/hasn-tech/python_projects

## Overview

This repository is a small collection of standalone Python examples, not one integrated application. It includes two print-based demos, a MySQL-to-CSV extraction script, and an Airflow DAG that submits a Spark step to EMR. The scripts have no documented links to one another; the graph shows only relationships visible in their source. The EMR job script is referenced by an S3 URI but is not present in the file tree.

Main entry points: [`OneDrive/Documents/extract_mysql.py`](https://github.com/hasn-tech/python_projects/blob/main/OneDrive/Documents/extract_mysql.py) (MySQL extractor), [`OneDrive/Documents/Airflow_DAG_Bash_Operator.py`](https://github.com/hasn-tech/python_projects/blob/main/OneDrive/Documents/Airflow_DAG_Bash_Operator.py) (EMR submit task)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_downloads_demo["Greeting demo<br/>[demo.py]"]
node_downloads_example["Sum example<br/>[example.py]"]
node_onedrive_demo["Greeting demo<br/>[demo.py]"]
node_extract_script["MySQL extractor<br/>[extract_mysql.py]"]
node_sales_db[("Sales database")]
node_orders_csv["Orders CSV"]
node_airflow_scheduler(("Airflow scheduler"))
node_emr_task["EMR submit task"]
node_aws_emr["AWS EMR"]
node_spark_job["S3 Spark script"]

node_extract_script -->|"reads orders"| node_sales_db
node_extract_script -->|"writes CSV"| node_orders_csv
node_airflow_scheduler -->|"schedules daily"| node_emr_task
node_emr_task -->|"submits step"| node_aws_emr
node_aws_emr -->|"runs script"| node_spark_job

click node_downloads_demo "https://github.com/hasn-tech/python_projects/blob/main/Downloads/demo.py"
click node_downloads_example "https://github.com/hasn-tech/python_projects/blob/main/Downloads/example.py"
click node_onedrive_demo "https://github.com/hasn-tech/python_projects/blob/main/OneDrive/Documents/demo.py"
click node_extract_script "https://github.com/hasn-tech/python_projects/blob/main/OneDrive/Documents/extract_mysql.py"
click node_emr_task "https://github.com/hasn-tech/python_projects/blob/main/OneDrive/Documents/Airflow_DAG_Bash_Operator.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_downloads_demo,node_downloads_example,node_onedrive_demo,node_extract_script toneTeal
class node_sales_db toneAmber
class node_orders_csv,node_aws_emr,node_spark_job toneIndigo
class node_airflow_scheduler,node_emr_task toneRose
```

## Components

### Other components

- [Greeting demo](https://github.com/hasn-tech/python_projects/blob/main/Downloads/demo.py): `Downloads/demo.py`
- [Sum example](https://github.com/hasn-tech/python_projects/blob/main/Downloads/example.py): `Downloads/example.py`
- [Greeting demo](https://github.com/hasn-tech/python_projects/blob/main/OneDrive/Documents/demo.py): `OneDrive/Documents/demo.py`
- [MySQL extractor](https://github.com/hasn-tech/python_projects/blob/main/OneDrive/Documents/extract_mysql.py): `OneDrive/Documents/extract_mysql.py`
- **Sales database**
- **Orders CSV**
- **Airflow scheduler**
- [EMR submit task](https://github.com/hasn-tech/python_projects/blob/main/OneDrive/Documents/Airflow_DAG_Bash_Operator.py): `OneDrive/Documents/Airflow_DAG_Bash_Operator.py`
- **AWS EMR**
- **S3 Spark script**

## Connections

- MySQL extractor → Sales database: reads orders (evidence: `OneDrive/Documents/extract_mysql.py`)
- MySQL extractor → Orders CSV: writes CSV (evidence: `OneDrive/Documents/extract_mysql.py`)
- Airflow scheduler → EMR submit task: schedules daily (evidence: `OneDrive/Documents/Airflow_DAG_Bash_Operator.py`)
- EMR submit task → AWS EMR: submits step (evidence: `OneDrive/Documents/Airflow_DAG_Bash_Operator.py`)
- AWS EMR → S3 Spark script: runs script
