# akhilr529/python_practice architecture

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

- Interactive diagram: https://gitdiagram.com/akhilr529/python_practice
- Repository: https://github.com/akhilr529/python_practice

## Overview

##### Project type and purpose
- This is a personal “Python Practice” repository, not a deployed application.
- Purpose: daily exercises in core Python concepts (syntax, data structures, OOP, file I/O, logging, etc.) and demonstration of solutions via scripts and notebooks.

##### File structure
- Top-level categorization:
– Notebooks: `*.ipynb` (daily practice in Jupyter)
– Scripts: `.py` files for utilities, data models, test harnesses, command-line tools
– Data & config: `.csv`, `.json`, `.yaml`, `.ser`, `.txt` files, `material/` folder with reference notes
– Logs: `.log` files showing output from various runs
– Archives: `.zip` files containing previous sessions or bulk data
- Patterns & conventions:
– Module-based approach (e.g., `module1.py`, `module2.py`, `custom_logger.py`)
– CLI entry-points (`demo.py`, `receiver.py`, `sender.py`, `test*.py`)
– Dedicated logger components (`custlogger.py`, `cust_console_logger.py`, `logging_config.init`)
– Data modeling scripts around `emp.py`, `student.py`

##### Extract insights from the README
- No high-level system architecture described—focus is on learning outcomes.
- Emphasis on modular code and incremental practice.

a. Main components
1. Notebooks layer (daily practice, interactive exploration)
2. Core modules layer (reusable Python modules: data models, algorithms)
3. Utilities layer (logging, CLI handlers, file I/O helpers)
4. Data & material layer (datasets, reference materials)
5. Test harness layer (scripts that validate or demonstrate module behavior)
6. Outputs layer (log files, serialized data, console output)
b. Relationships & interactions
- Notebooks import core modules and utilities to run examples.
- Core modules read/write data from the Data layer.
- Utilities provide logging and argument parsing to both notebooks and scripts.
- Test harness scripts invoke core modules and utilities and generate logs.
- All scripts and notebooks produce outputs (logs, serialized data) captured in the Outputs layer.
c. Architectural patterns & principles
- Modular separation: data models vs. utilities vs. test drivers.
- Single Responsibility: each module handles one concept (e.g., logging, command-line args, data serialization).
- Reusability: core modules are consumed by both notebooks and CLI scripts.
d. Key technologies/frameworks
- Python 3.x standard library (logging, argparse, file I/O)
- Jupyter notebooks for interactive practice
- YAML/JSON/CSV for configuration and sample data

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Notebooks Layer
    subgraph "Notebooks Layer"
        style NotebooksLayer fill:#D0E8FF,stroke:#004080,stroke-width:2px
        NB1["01_04_2025.ipynb"]:::notebook
        NB2["02_04_2025.ipynb"]:::notebook
        NB3["python_module.ipynb"]:::notebook
    end

    %% Core Modules Layer
    subgraph "Core Modules Layer"
        style CoreModulesLayer fill:#E0FFE0,stroke:#006400,stroke-width:2px
        M1["emp.py"]:::core
        M2["student.py"]:::core
        M3["module1.py"]:::core
        M4["akhil_math.py"]:::core
    end

    %% Utilities Layer
    subgraph "Utilities Layer"
        style UtilitiesLayer fill:#FFE5B4,stroke:#CC8400,stroke-width:2px
        U1["custom_logger.py"]:::util
        U2["cust_console_logger.py"]:::util
        U3["command_line_arguments.py"]:::util
        U4["demo.py"]:::util
    end

    %% Data & Material Layer
    subgraph "Data & Material Layer"
        style DataLayer fill:#FFF8B4,stroke:#B39D00,stroke-width:2px
        D1["emp.csv"]:::data
        D2["emp.json"]:::data
        D3["material/python.txt"]:::data
        D4["download.zip"]:::data
    end

    %% Test Harness Layer
    subgraph "Test Harness Layer"
        style TestLayer fill:#F0E0FF,stroke:#4B0082,stroke-width:2px
        T1["test1.py"]:::test
        T2["test5.py"]:::test
        T3["test9.py"]:::test
    end

    %% Outputs Layer
    subgraph "Outputs Layer"
        style OutputsLayer fill:#E0E0E0,stroke:#4F4F4F,stroke-width:2px
        O1["test.log"]:::output
        O2["Student2.log"]:::output
        O3["custtest.log"]:::output
    end

    %% Relationships
    NB1 -->|"imports"| M1
    NB1 -->|"imports"| U1
    NB2 -->|"imports"| M2
    NB2 -->|"imports"| U3
    NB3 -->|"imports"| M3
    NB3 -->|"imports"| U4

    M1 -->|"reads/writes"| D1
    M2 -->|"reads/writes"| D2

    U1 -->|"provides logging"| NB1
    U1 -->|"provides logging"| T1
    U3 -->|"parses args"| NB2
    U3 -->|"parses args"| T2

    T1 -->|"executes modules"| M1
    T1 -->|"executes utils"| U1
    T2 -->|"executes modules"| M3
    T2 -->|"executes utils"| U3
    T3 -->|"executes modules"| M4
    T3 -->|"executes utils"| U4

    NB1 -->|"outputs logs/data"| O1
    NB2 -->|"outputs logs"| O2
    T1 -->|"outputs logs"| O3
    T3 -->|"outputs logs"| O1

    %% Click Events
    click NB1 "https://github.com/akhilr529/python_practice/blob/main/01_04_2025.ipynb"
    click NB2 "https://github.com/akhilr529/python_practice/blob/main/02_04_2025.ipynb"
    click NB3 "https://github.com/akhilr529/python_practice/blob/main/python_module.ipynb"
    click M1 "https://github.com/akhilr529/python_practice/blob/main/emp.py"
    click M2 "https://github.com/akhilr529/python_practice/blob/main/student.py"
    click M3 "https://github.com/akhilr529/python_practice/blob/main/module1.py"
    click M4 "https://github.com/akhilr529/python_practice/blob/main/akhil_math.py"
    click U1 "https://github.com/akhilr529/python_practice/blob/main/custom_logger.py"
    click U2 "https://github.com/akhilr529/python_practice/blob/main/cust_console_logger.py"
    click U3 "https://github.com/akhilr529/python_practice/blob/main/command_line_arguments.py"
    click U4 "https://github.com/akhilr529/python_practice/blob/main/demo.py"
    click D1 "https://github.com/akhilr529/python_practice/blob/main/emp.csv"
    click D2 "https://github.com/akhilr529/python_practice/blob/main/emp.json"
    click D3 "https://github.com/akhilr529/python_practice/blob/main/material/python.txt"
    click D4 "https://github.com/akhilr529/python_practice/blob/main/download.zip"
    click T1 "https://github.com/akhilr529/python_practice/blob/main/test1.py"
    click T2 "https://github.com/akhilr529/python_practice/blob/main/test5.py"
    click T3 "https://github.com/akhilr529/python_practice/blob/main/test9.py"
    click O1 "https://github.com/akhilr529/python_practice/blob/main/test.log"
    click O2 "https://github.com/akhilr529/python_practice/blob/main/Student2.log"
    click O3 "https://github.com/akhilr529/python_practice/blob/main/custtest.log"

    %% Styles
    classDef notebook fill:#D0E8FF,stroke:#004080,color:#000
    classDef core fill:#E0FFE0,stroke:#006400,color:#000
    classDef util fill:#FFE5B4,stroke:#CC8400,color:#000
    classDef data fill:#FFF8B4,stroke:#B39D00,color:#000
    classDef test fill:#F0E0FF,stroke:#4B0082,color:#000
    classDef output fill:#E0E0E0,stroke:#4F4F4F,color:#000
```
