# aamena0928-ai/python-dev-basics architecture

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

- Interactive diagram: https://gitdiagram.com/aamena0928-ai/python-dev-basics
- Repository: https://github.com/aamena0928-ai/python-dev-basics

## Overview

This repository is a set of standalone Python teaching programs, progressing from language fundamentals through collections and error handling to a small package-and-API exercise. The main interactive workflows are the Pantry Manager and Cow Party command loops; other lessons demonstrate concepts independently. Sampled code supports the Cow Party call relationships and Pantry Manager’s internal operations. Most lesson files were not excerpted, so their internal behavior and connections are not inferred.

Main entry points: [`09_libraries_and_apis/libraries_and_apis.py`](https://github.com/aamena0928-ai/python-dev-basics/blob/main/09_libraries_and_apis/libraries_and_apis.py) (Cow Party CLI), [`08_exceptions_and_raise/exceptions_and_raise.py`](https://github.com/aamena0928-ai/python-dev-basics/blob/main/08_exceptions_and_raise/exceptions_and_raise.py) (Pantry Manager), [`09_libraries_and_apis/cow_tools/luck.py`](https://github.com/aamena0928-ai/python-dev-basics/blob/main/09_libraries_and_apis/cow_tools/luck.py) (Random Utilities), [`09_libraries_and_apis/cow_tools/jokes.py`](https://github.com/aamena0928-ai/python-dev-basics/blob/main/09_libraries_and_apis/cow_tools/jokes.py) (Joke Client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_fundamentals["Python Fundamentals"]
  node_variables["Variables<br/>[01_variables.py]"]
  node_functions["Functions<br/>[02_functions.py]"]
  node_returns["Return Values"]
  node_sideeffects["Side Effects<br/>[04_side_effects.py]"]
  node_scope["Scope and Globals"]
  node_defaults["Mutable Defaults"]
end

subgraph group_collections["Collections and Data"]
  node_dictionaries["Dictionaries<br/>[01_dictionaries.py]"]
  node_dictionarymethods["Dictionary Methods"]
  node_lists["Lists and Loops<br/>[lists_and_loops.py]"]
  node_strings["String Processing<br/>[strings.py]"]
  node_tupleswhile["Tuples and While"]
end

subgraph group_errors["Errors and Applications"]
  node_tryexcept["Try and Except<br/>[01_try_except.py]"]
  node_shoppingcart["Shopping Cart"]
  node_exceptions["Pantry Manager"]
  node_pantryinventory["Pantry Operations"]
end

subgraph group_integrations["Packages and APIs"]
  node_cowparty["Cow Party CLI"]
  node_luck["Random Utilities<br/>[luck.py]"]
  node_jokes["Joke Client<br/>[jokes.py]"]
end

node_user(("User"))
node_jokeapi{{"Joke API"}}
node_cowsay["Cowsay Library"]
node_randomlib["Python Random"]

node_exceptions -->|"reads commands"| node_user
node_exceptions -->|"calls operations"| node_pantryinventory
node_cowparty -->|"reads commands"| node_user
node_cowparty -->|"calls utilities"| node_luck
node_cowparty -->|"requests joke"| node_jokes
node_cowparty -->|"renders output"| node_cowsay
node_cowparty -->|"chooses character"| node_randomlib
node_jokes -->|"fetches joke"| node_jokeapi
node_luck -->|"uses randomness"| node_randomlib

click node_variables "https://github.com/aamena0928-ai/python-dev-basics/blob/main/01_variables_and_functions/01_variables.py"
click node_functions "https://github.com/aamena0928-ai/python-dev-basics/blob/main/01_variables_and_functions/02_functions.py"
click node_returns "https://github.com/aamena0928-ai/python-dev-basics/blob/main/01_variables_and_functions/03_return_values.py"
click node_sideeffects "https://github.com/aamena0928-ai/python-dev-basics/blob/main/01_variables_and_functions/04_side_effects.py"
click node_scope "https://github.com/aamena0928-ai/python-dev-basics/blob/main/01_variables_and_functions/05_scope_and_globals.py"
click node_defaults "https://github.com/aamena0928-ai/python-dev-basics/blob/main/01_variables_and_functions/06_mutable_defaults.py"
click node_tryexcept "https://github.com/aamena0928-ai/python-dev-basics/blob/main/02_error_handling/01_try_except.py"
click node_dictionaries "https://github.com/aamena0928-ai/python-dev-basics/blob/main/03_dictionaries/01_dictionaries.py"
click node_dictionarymethods "https://github.com/aamena0928-ai/python-dev-basics/blob/main/03_dictionaries/02_dictionary_methods.py"
click node_lists "https://github.com/aamena0928-ai/python-dev-basics/blob/main/04_lists_and_loops/lists_and_loops.py"
click node_strings "https://github.com/aamena0928-ai/python-dev-basics/blob/main/05_strings/strings.py"
click node_tupleswhile "https://github.com/aamena0928-ai/python-dev-basics/blob/main/06_tuples_and_while/tuples_and_while.py"
click node_shoppingcart "https://github.com/aamena0928-ai/python-dev-basics/blob/main/07_combining_basics/combining_basics.py"
click node_exceptions "https://github.com/aamena0928-ai/python-dev-basics/blob/main/08_exceptions_and_raise/exceptions_and_raise.py"
click node_pantryinventory "https://github.com/aamena0928-ai/python-dev-basics/blob/main/08_exceptions_and_raise/exceptions_and_raise.py"
click node_cowparty "https://github.com/aamena0928-ai/python-dev-basics/blob/main/09_libraries_and_apis/libraries_and_apis.py"
click node_luck "https://github.com/aamena0928-ai/python-dev-basics/blob/main/09_libraries_and_apis/cow_tools/luck.py"
click node_jokes "https://github.com/aamena0928-ai/python-dev-basics/blob/main/09_libraries_and_apis/cow_tools/jokes.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_variables,node_functions,node_returns,node_sideeffects,node_scope,node_defaults,node_user toneBlue
class node_dictionaries,node_dictionarymethods,node_lists,node_strings,node_tupleswhile toneAmber
class node_tryexcept,node_shoppingcart,node_exceptions,node_pantryinventory,node_jokeapi toneMint
class node_cowparty,node_luck,node_jokes toneRose
class node_cowsay,node_randomlib toneIndigo
```

## Components

### Python Fundamentals

- [Variables](https://github.com/aamena0928-ai/python-dev-basics/blob/main/01_variables_and_functions/01_variables.py): `01_variables_and_functions/01_variables.py`
- [Functions](https://github.com/aamena0928-ai/python-dev-basics/blob/main/01_variables_and_functions/02_functions.py): `01_variables_and_functions/02_functions.py`
- [Return Values](https://github.com/aamena0928-ai/python-dev-basics/blob/main/01_variables_and_functions/03_return_values.py): `01_variables_and_functions/03_return_values.py`
- [Side Effects](https://github.com/aamena0928-ai/python-dev-basics/blob/main/01_variables_and_functions/04_side_effects.py): `01_variables_and_functions/04_side_effects.py`
- [Scope and Globals](https://github.com/aamena0928-ai/python-dev-basics/blob/main/01_variables_and_functions/05_scope_and_globals.py): `01_variables_and_functions/05_scope_and_globals.py`
- [Mutable Defaults](https://github.com/aamena0928-ai/python-dev-basics/blob/main/01_variables_and_functions/06_mutable_defaults.py): `01_variables_and_functions/06_mutable_defaults.py`

### Collections and Data

- [Dictionaries](https://github.com/aamena0928-ai/python-dev-basics/blob/main/03_dictionaries/01_dictionaries.py): `03_dictionaries/01_dictionaries.py`
- [Dictionary Methods](https://github.com/aamena0928-ai/python-dev-basics/blob/main/03_dictionaries/02_dictionary_methods.py): `03_dictionaries/02_dictionary_methods.py`
- [Lists and Loops](https://github.com/aamena0928-ai/python-dev-basics/blob/main/04_lists_and_loops/lists_and_loops.py): `04_lists_and_loops/lists_and_loops.py`
- [String Processing](https://github.com/aamena0928-ai/python-dev-basics/blob/main/05_strings/strings.py): `05_strings/strings.py`
- [Tuples and While](https://github.com/aamena0928-ai/python-dev-basics/blob/main/06_tuples_and_while/tuples_and_while.py): `06_tuples_and_while/tuples_and_while.py`

### Errors and Applications

- [Try and Except](https://github.com/aamena0928-ai/python-dev-basics/blob/main/02_error_handling/01_try_except.py): `02_error_handling/01_try_except.py`
- [Shopping Cart](https://github.com/aamena0928-ai/python-dev-basics/blob/main/07_combining_basics/combining_basics.py): `07_combining_basics/combining_basics.py`
- [Pantry Manager](https://github.com/aamena0928-ai/python-dev-basics/blob/main/08_exceptions_and_raise/exceptions_and_raise.py): `08_exceptions_and_raise/exceptions_and_raise.py`
- [Pantry Operations](https://github.com/aamena0928-ai/python-dev-basics/blob/main/08_exceptions_and_raise/exceptions_and_raise.py): `08_exceptions_and_raise/exceptions_and_raise.py`

### Packages and APIs

- [Cow Party CLI](https://github.com/aamena0928-ai/python-dev-basics/blob/main/09_libraries_and_apis/libraries_and_apis.py): `09_libraries_and_apis/libraries_and_apis.py`
- [Random Utilities](https://github.com/aamena0928-ai/python-dev-basics/blob/main/09_libraries_and_apis/cow_tools/luck.py): `09_libraries_and_apis/cow_tools/luck.py`
- [Joke Client](https://github.com/aamena0928-ai/python-dev-basics/blob/main/09_libraries_and_apis/cow_tools/jokes.py): `09_libraries_and_apis/cow_tools/jokes.py`

### Other components

- **User**
- **Joke API**
- **Cowsay Library**
- **Python Random**

## Connections

- Pantry Manager → User: reads commands (evidence: `08_exceptions_and_raise/exceptions_and_raise.py`)
- Pantry Manager → Pantry Operations: calls operations (evidence: `08_exceptions_and_raise/exceptions_and_raise.py`)
- Cow Party CLI → User: reads commands (evidence: `09_libraries_and_apis/libraries_and_apis.py`)
- Cow Party CLI → Random Utilities: calls utilities (evidence: `09_libraries_and_apis/libraries_and_apis.py`)
- Cow Party CLI → Joke Client: requests joke (evidence: `09_libraries_and_apis/libraries_and_apis.py`)
- Cow Party CLI → Cowsay Library: renders output (evidence: `09_libraries_and_apis/libraries_and_apis.py`)
- Cow Party CLI → Python Random: chooses character (evidence: `09_libraries_and_apis/libraries_and_apis.py`)
- Joke Client → Joke API: fetches joke (evidence: `09_libraries_and_apis/cow_tools/jokes.py`)
- Random Utilities → Python Random: uses randomness (evidence: `09_libraries_and_apis/cow_tools/luck.py`)
