# pauloreloy/multiapi architecture

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

- Interactive diagram: https://gitdiagram.com/pauloreloy/multiapi
- Repository: https://github.com/pauloreloy/multiapi

## Overview

This small Python program loads an API definition, substitutes input values into its endpoint, makes an HTTP GET request, and prints successful JSON responses. The shown handler demonstrates a CEP lookup; the configuration contents are not included, so the external service and endpoint cannot be identified. LogBuffer is a separate singleton utility, and the sampled code does not show it being used.

Main entry points: [`classes/APIClient.py`](https://github.com/pauloreloy/multiapi/blob/main/classes/APIClient.py) (API Client), [`handler.py`](https://github.com/pauloreloy/multiapi/blob/main/handler.py) (CLI Handler), [`config/api.json`](https://github.com/pauloreloy/multiapi/blob/main/config/api.json) (API Config)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Runtime"]
  node_handler["CLI Handler<br/>[handler.py]"]
  node_client["API Client<br/>[APIClient.py]"]
  node_config["API Config<br/>[api.json]"]
  node_logbuffer["Log Buffer<br/>[logbuffer.py]"]
end

node_user(("User"))
node_service["HTTP API"]
node_console["Console Output"]

node_user -.->|"runs"| node_handler
node_handler -->|"creates, calls"| node_client
node_client -->|"loads"| node_config
node_client -->|"sends GET"| node_service
node_service -->|"returns response"| node_client
node_handler -->|"prints JSON"| node_console

click node_handler "https://github.com/pauloreloy/multiapi/blob/main/handler.py"
click node_client "https://github.com/pauloreloy/multiapi/blob/main/classes/APIClient.py"
click node_config "https://github.com/pauloreloy/multiapi/blob/main/config/api.json"
click node_logbuffer "https://github.com/pauloreloy/multiapi/blob/main/classes/logbuffer.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_handler,node_client,node_config,node_logbuffer,node_user toneBlue
class node_service toneMint
class node_console toneIndigo
```

## Components

### Runtime

- [CLI Handler](https://github.com/pauloreloy/multiapi/blob/main/handler.py): `handler.py`
- [API Client](https://github.com/pauloreloy/multiapi/blob/main/classes/APIClient.py): `classes/APIClient.py`
- [API Config](https://github.com/pauloreloy/multiapi/blob/main/config/api.json): `config/api.json`
- [Log Buffer](https://github.com/pauloreloy/multiapi/blob/main/classes/logbuffer.py): `classes/logbuffer.py`

### Other components

- **User**
- **HTTP API**
- **Console Output**

## Connections

- User → CLI Handler: runs
- CLI Handler → API Client: creates, calls (evidence: `handler.py`)
- API Client → API Config: loads (evidence: `classes/APIClient.py`)
- API Client → HTTP API: sends GET (evidence: `classes/APIClient.py`)
- HTTP API → API Client: returns response (evidence: `classes/APIClient.py`)
- CLI Handler → Console Output: prints JSON (evidence: `handler.py`)
