# jezza34000/veolia-api architecture

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

- Interactive diagram: https://gitdiagram.com/jezza34000/veolia-api
- Repository: https://github.com/jezza34000/veolia-api

## Overview

This repository is a small asynchronous Python client for Veolia’s water-portal API. The principal workflow is for an application to create a client, fetch data for a date range, and read the resulting account data; the client handles authentication, subscription lookup, consumption history, alert settings, and billing-plan retrieval. The sampled excerpts support those stages, but omit parts of the client implementation, so the graph shows only evidenced calls and documented workflow links.

Main entry points: [`veolia_api/veolia_api.py`](https://github.com/jezza34000/veolia-api/blob/main/veolia_api/veolia_api.py) (Async API client), [`veolia_api/exceptions.py`](https://github.com/jezza34000/veolia-api/blob/main/veolia_api/exceptions.py) (Client exceptions), [`veolia_api/model.py`](https://github.com/jezza34000/veolia-api/blob/main/veolia_api/model.py) (Account models)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Veolia client"]
  node_client["Async API client<br/>[veolia_api.py]"]
  node_auth["Authentication<br/>[veolia_api.py]"]
  node_account["Subscription lookup<br/>[veolia_api.py]"]
  node_consumption["Consumption history<br/>[veolia_api.py]"]
  node_alerts["Alert settings<br/>[veolia_api.py]"]
  node_billing["Billing plan<br/>[veolia_api.py]"]
end

subgraph group_domain["Account data"]
  node_models["Account models<br/>[model.py]"]
  node_errors["Client exceptions<br/>[exceptions.py]"]
end

node_consumer(("Calling application"))
node_transport["Veolia HTTP API"]

node_consumer -->|"creates client"| node_client
node_consumer -->|"fetches data"| node_client
node_client -->|"authenticates"| node_auth
node_client -->|"loads subscription"| node_account
node_client -->|"fetches history"| node_consumption
node_client -->|"fetches settings"| node_alerts
node_client -->|"fetches plan"| node_billing
node_client -->|"sends requests"| node_transport
node_auth -->|"sends requests"| node_transport
node_account -->|"sends requests"| node_transport
node_consumption -->|"sends requests"| node_transport
node_alerts -->|"sends requests"| node_transport
node_billing -->|"sends requests"| node_transport
node_client -->|"stores results"| node_models
node_auth -->|"raises errors"| node_errors
node_client -->|"raises errors"| node_errors

click node_client "https://github.com/jezza34000/veolia-api/blob/main/veolia_api/veolia_api.py"
click node_auth "https://github.com/jezza34000/veolia-api/blob/main/veolia_api/veolia_api.py"
click node_account "https://github.com/jezza34000/veolia-api/blob/main/veolia_api/veolia_api.py"
click node_consumption "https://github.com/jezza34000/veolia-api/blob/main/veolia_api/veolia_api.py"
click node_alerts "https://github.com/jezza34000/veolia-api/blob/main/veolia_api/veolia_api.py"
click node_billing "https://github.com/jezza34000/veolia-api/blob/main/veolia_api/veolia_api.py"
click node_models "https://github.com/jezza34000/veolia-api/blob/main/veolia_api/model.py"
click node_errors "https://github.com/jezza34000/veolia-api/blob/main/veolia_api/exceptions.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_client,node_auth,node_account,node_consumption,node_alerts,node_billing toneBlue
class node_models,node_errors toneAmber
class node_consumer toneIndigo
class node_transport toneMint
```

## Components

### Veolia client

- [Async API client](https://github.com/jezza34000/veolia-api/blob/main/veolia_api/veolia_api.py): `veolia_api/veolia_api.py`
- [Authentication](https://github.com/jezza34000/veolia-api/blob/main/veolia_api/veolia_api.py): `veolia_api/veolia_api.py`
- [Subscription lookup](https://github.com/jezza34000/veolia-api/blob/main/veolia_api/veolia_api.py): `veolia_api/veolia_api.py`
- [Consumption history](https://github.com/jezza34000/veolia-api/blob/main/veolia_api/veolia_api.py): `veolia_api/veolia_api.py`
- [Alert settings](https://github.com/jezza34000/veolia-api/blob/main/veolia_api/veolia_api.py): `veolia_api/veolia_api.py`
- [Billing plan](https://github.com/jezza34000/veolia-api/blob/main/veolia_api/veolia_api.py): `veolia_api/veolia_api.py`

### Account data

- [Account models](https://github.com/jezza34000/veolia-api/blob/main/veolia_api/model.py): `veolia_api/model.py`
- [Client exceptions](https://github.com/jezza34000/veolia-api/blob/main/veolia_api/exceptions.py): `veolia_api/exceptions.py`

### Other components

- **Calling application**
- **Veolia HTTP API**

## Connections

- Calling application → Async API client: creates client (evidence: `README.md`)
- Calling application → Async API client: fetches data (evidence: `README.md`)
- Async API client → Authentication: authenticates (evidence: `veolia_api/veolia_api.py`)
- Async API client → Subscription lookup: loads subscription (evidence: `veolia_api/veolia_api.py`)
- Async API client → Consumption history: fetches history (evidence: `veolia_api/veolia_api.py`)
- Async API client → Alert settings: fetches settings (evidence: `veolia_api/veolia_api.py`)
- Async API client → Billing plan: fetches plan (evidence: `veolia_api/veolia_api.py`)
- Async API client → Veolia HTTP API: sends requests (evidence: `veolia_api/veolia_api.py`)
- Authentication → Veolia HTTP API: sends requests (evidence: `veolia_api/veolia_api.py`)
- Subscription lookup → Veolia HTTP API: sends requests (evidence: `veolia_api/veolia_api.py`)
- Consumption history → Veolia HTTP API: sends requests (evidence: `veolia_api/veolia_api.py`)
- Alert settings → Veolia HTTP API: sends requests (evidence: `veolia_api/veolia_api.py`)
- Billing plan → Veolia HTTP API: sends requests (evidence: `veolia_api/veolia_api.py`)
- Async API client → Account models: stores results (evidence: `veolia_api/veolia_api.py`)
- Authentication → Client exceptions: raises errors (evidence: `veolia_api/veolia_api.py`)
- Async API client → Client exceptions: raises errors (evidence: `veolia_api/veolia_api.py`)
