# grahamwetzler/smart-meter-texas architecture

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

- Interactive diagram: https://gitdiagram.com/grahamwetzler/smart-meter-texas
- Repository: https://github.com/grahamwetzler/smart-meter-texas

## Overview

Smart Meter Texas is an asynchronous Python client for the unofficial Smart Meter Texas API. Its main workflow authenticates an account, fetches associated meters, and retrieves meter readings; it also supports interval data and documents dashboard retrieval. The sampled source shows the account, meter, and HTTP-client behavior in one package module, plus shared constants and exception types. Dashboard implementation details were not sampled, so its connection is documented but unverified.

Main entry points: [`smart_meter_texas/__init__.py`](https://github.com/grahamwetzler/smart-meter-texas/blob/main/smart_meter_texas/__init__.py) (API client), [`smart_meter_texas/const.py`](https://github.com/grahamwetzler/smart-meter-texas/blob/main/smart_meter_texas/const.py) (API constants), [`smart_meter_texas/exceptions.py`](https://github.com/grahamwetzler/smart-meter-texas/blob/main/smart_meter_texas/exceptions.py) (Exceptions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API client"]
  node_account["Account<br/>[__init__.py]"]
  node_client["API client<br/>[__init__.py]"]
end

subgraph group_meter["Meter data"]
  node_meters["Meter lookup<br/>[__init__.py]"]
  node_od_read["On-demand reading<br/>[__init__.py]"]
  node_interval["Interval data<br/>[__init__.py]"]
  node_dashboard["Dashboard retrieval<br/>[__init__.py]"]
end

subgraph group_shared["Shared definitions"]
  node_constants["API constants<br/>[const.py]"]
  node_errors["Exceptions<br/>[exceptions.py]"]
end

node_user(("Package user"))
node_smt["Smart Meter Texas"]

node_user -.->|"uses"| node_account
node_account -->|"requests through"| node_client
node_meters -->|"requests through"| node_client
node_od_read -->|"requests through"| node_client
node_interval -->|"requests through"| node_client
node_client -->|"sends HTTP requests"| node_smt
node_client -->|"imports"| node_constants
node_client -->|"imports"| node_errors
node_dashboard -.->|"retrieves dashboard"| node_smt

click node_account "https://github.com/grahamwetzler/smart-meter-texas/blob/main/smart_meter_texas/__init__.py"
click node_client "https://github.com/grahamwetzler/smart-meter-texas/blob/main/smart_meter_texas/__init__.py"
click node_meters "https://github.com/grahamwetzler/smart-meter-texas/blob/main/smart_meter_texas/__init__.py"
click node_od_read "https://github.com/grahamwetzler/smart-meter-texas/blob/main/smart_meter_texas/__init__.py"
click node_interval "https://github.com/grahamwetzler/smart-meter-texas/blob/main/smart_meter_texas/__init__.py"
click node_dashboard "https://github.com/grahamwetzler/smart-meter-texas/blob/main/smart_meter_texas/__init__.py"
click node_constants "https://github.com/grahamwetzler/smart-meter-texas/blob/main/smart_meter_texas/const.py"
click node_errors "https://github.com/grahamwetzler/smart-meter-texas/blob/main/smart_meter_texas/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_account,node_client,node_user toneBlue
class node_meters,node_od_read,node_interval,node_dashboard toneAmber
class node_constants,node_errors toneMint
class node_smt toneIndigo
```

## Components

### API client

- [Account](https://github.com/grahamwetzler/smart-meter-texas/blob/main/smart_meter_texas/__init__.py): `smart_meter_texas/__init__.py`
- [API client](https://github.com/grahamwetzler/smart-meter-texas/blob/main/smart_meter_texas/__init__.py): `smart_meter_texas/__init__.py`

### Meter data

- [Meter lookup](https://github.com/grahamwetzler/smart-meter-texas/blob/main/smart_meter_texas/__init__.py): `smart_meter_texas/__init__.py`
- [On-demand reading](https://github.com/grahamwetzler/smart-meter-texas/blob/main/smart_meter_texas/__init__.py): `smart_meter_texas/__init__.py`
- [Interval data](https://github.com/grahamwetzler/smart-meter-texas/blob/main/smart_meter_texas/__init__.py): `smart_meter_texas/__init__.py`
- [Dashboard retrieval](https://github.com/grahamwetzler/smart-meter-texas/blob/main/smart_meter_texas/__init__.py): `smart_meter_texas/__init__.py`

### Shared definitions

- [API constants](https://github.com/grahamwetzler/smart-meter-texas/blob/main/smart_meter_texas/const.py): `smart_meter_texas/const.py`
- [Exceptions](https://github.com/grahamwetzler/smart-meter-texas/blob/main/smart_meter_texas/exceptions.py): `smart_meter_texas/exceptions.py`

### Other components

- **Package user**
- **Smart Meter Texas**

## Connections

- Package user → Account: uses
- Account → API client: requests through (evidence: `smart_meter_texas/__init__.py`)
- Meter lookup → API client: requests through (evidence: `smart_meter_texas/__init__.py`)
- On-demand reading → API client: requests through (evidence: `smart_meter_texas/__init__.py`)
- Interval data → API client: requests through (evidence: `smart_meter_texas/__init__.py`)
- API client → Smart Meter Texas: sends HTTP requests (evidence: `smart_meter_texas/__init__.py`)
- API client → API constants: imports (evidence: `smart_meter_texas/__init__.py`)
- API client → Exceptions: imports (evidence: `smart_meter_texas/__init__.py`)
- Dashboard retrieval → Smart Meter Texas: retrieves dashboard (evidence: `README.rst`)
