# atkeya/automation-testing-pythonscripting architecture

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

- Interactive diagram: https://gitdiagram.com/atkeya/automation-testing-pythonscripting
- Repository: https://github.com/atkeya/automation-testing-pythonscripting

## Overview

This repository is a Python API-automation script for a food-ordering service, with separate user and driver flows. The user runner searches for an eligible restaurant, builds a cart, selects a promotion, checks the calculated bill, and—if the check passes—places and tracks an order through payment confirmation. A separate driver runner polls open orders and advances their statuses. Driver location pinging is another standalone capability. The graph follows relationships shown in the excerpts; external API calls are grouped at the service boundary.

Main entry points: [`runner_user.py`](https://github.com/atkeya/automation-testing-pythonscripting/blob/main/runner_user.py) (User runner), [`food_order.py`](https://github.com/atkeya/automation-testing-pythonscripting/blob/main/food_order.py) (Order and payment), [`runner_driver.py`](https://github.com/atkeya/automation-testing-pythonscripting/blob/main/runner_driver.py) (Driver runner), [`driver_ping.py`](https://github.com/atkeya/automation-testing-pythonscripting/blob/main/driver_ping.py) (Location ping)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_user_flow["User ordering"]
  node_user(("User runner<br/>[runner_user.py]"))
  node_restaurant["Restaurant search"]
  node_items["Item selection<br/>[search_item.py]"]
  node_promos["Promotion lookup<br/>[promo.py]"]
  node_assertion["Bill assertion"]
end

subgraph group_order_runtime["Order service"]
  node_food_order["Order and payment<br/>[food_order.py]"]
  node_food_api{{"Food API"}}
end

subgraph group_driver_flow["Driver operations"]
  node_driver_runner(("Driver runner<br/>[runner_driver.py]"))
  node_driver_config["Driver configuration<br/>[driver_config.py]"]
  node_driver_order["Order fulfillment<br/>[driver_order.py]"]
  node_driver_ping["Location ping<br/>[driver_ping.py]"]
  node_location_api{{"Location service"}}
end

node_user -->|"searches"| node_restaurant
node_user -->|"selects items"| node_items
node_user -->|"looks up promos"| node_promos
node_user -->|"checks bill"| node_assertion
node_user -->|"places order"| node_food_order
node_assertion -->|"requests bill"| node_food_order
node_restaurant -->|"queries"| node_food_api
node_items -->|"fetches items"| node_food_api
node_promos -->|"fetches promos"| node_food_api
node_food_order -->|"sends order requests"| node_food_api
node_driver_runner -->|"runs fulfillment"| node_driver_order
node_driver_runner -->|"loads settings"| node_driver_config
node_driver_order -->|"updates orders"| node_food_api
node_driver_ping -->|"loads credentials"| node_driver_config
node_driver_ping -->|"posts pings"| node_location_api

click node_user "https://github.com/atkeya/automation-testing-pythonscripting/blob/main/runner_user.py"
click node_restaurant "https://github.com/atkeya/automation-testing-pythonscripting/blob/main/search_restaurant.py"
click node_items "https://github.com/atkeya/automation-testing-pythonscripting/blob/main/search_item.py"
click node_promos "https://github.com/atkeya/automation-testing-pythonscripting/blob/main/promo.py"
click node_assertion "https://github.com/atkeya/automation-testing-pythonscripting/blob/main/calculation_assertion.py"
click node_food_order "https://github.com/atkeya/automation-testing-pythonscripting/blob/main/food_order.py"
click node_driver_runner "https://github.com/atkeya/automation-testing-pythonscripting/blob/main/runner_driver.py"
click node_driver_config "https://github.com/atkeya/automation-testing-pythonscripting/blob/main/driver_config.py"
click node_driver_order "https://github.com/atkeya/automation-testing-pythonscripting/blob/main/driver_order.py"
click node_driver_ping "https://github.com/atkeya/automation-testing-pythonscripting/blob/main/driver_ping.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_user,node_restaurant,node_items,node_promos,node_assertion toneBlue
class node_food_order,node_food_api toneAmber
class node_driver_runner,node_driver_config,node_driver_order,node_driver_ping,node_location_api toneMint
```

## Components

### User ordering

- [User runner](https://github.com/atkeya/automation-testing-pythonscripting/blob/main/runner_user.py): `runner_user.py`
- [Restaurant search](https://github.com/atkeya/automation-testing-pythonscripting/blob/main/search_restaurant.py): `search_restaurant.py`
- [Item selection](https://github.com/atkeya/automation-testing-pythonscripting/blob/main/search_item.py): `search_item.py`
- [Promotion lookup](https://github.com/atkeya/automation-testing-pythonscripting/blob/main/promo.py): `promo.py`
- [Bill assertion](https://github.com/atkeya/automation-testing-pythonscripting/blob/main/calculation_assertion.py): `calculation_assertion.py`

### Order service

- [Order and payment](https://github.com/atkeya/automation-testing-pythonscripting/blob/main/food_order.py): `food_order.py`
- **Food API**

### Driver operations

- [Driver runner](https://github.com/atkeya/automation-testing-pythonscripting/blob/main/runner_driver.py): `runner_driver.py`
- [Driver configuration](https://github.com/atkeya/automation-testing-pythonscripting/blob/main/driver_config.py): `driver_config.py`
- [Order fulfillment](https://github.com/atkeya/automation-testing-pythonscripting/blob/main/driver_order.py): `driver_order.py`
- [Location ping](https://github.com/atkeya/automation-testing-pythonscripting/blob/main/driver_ping.py): `driver_ping.py`
- **Location service**

## Connections

- User runner → Restaurant search: searches (evidence: `runner_user.py`)
- User runner → Item selection: selects items (evidence: `runner_user.py`)
- User runner → Promotion lookup: looks up promos (evidence: `runner_user.py`)
- User runner → Bill assertion: checks bill (evidence: `runner_user.py`)
- User runner → Order and payment: places order (evidence: `runner_user.py`)
- Bill assertion → Order and payment: requests bill (evidence: `calculation_assertion.py`)
- Restaurant search → Food API: queries (evidence: `search_restaurant.py`)
- Item selection → Food API: fetches items (evidence: `search_item.py`)
- Promotion lookup → Food API: fetches promos (evidence: `promo.py`)
- Order and payment → Food API: sends order requests (evidence: `food_order.py`)
- Driver runner → Order fulfillment: runs fulfillment (evidence: `runner_driver.py`)
- Driver runner → Driver configuration: loads settings (evidence: `runner_driver.py`)
- Order fulfillment → Food API: updates orders (evidence: `driver_order.py`)
- Location ping → Driver configuration: loads credentials (evidence: `driver_ping.py`)
- Location ping → Location service: posts pings (evidence: `driver_ping.py`)
