# fryyyyy/zeekr_ev_api architecture

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

- Interactive diagram: https://gitdiagram.com/fryyyyy/zeekr_ev_api
- Repository: https://github.com/fryyyyy/zeekr_ev_api

## Overview

zeekr_ev_api is a Python client for Zeekr EV services. A caller configures a ZeekrClient with account credentials and required signing/encryption secrets, then uses it to authenticate and request vehicle data or actions. The client handles authentication and domain operations; network helpers send HMAC- or app-signed requests, while separate modules implement each signing scheme. README and sampled source establish this structure; some vehicle capabilities are identified by endpoint constants but their individual call paths were not sampled.

Main entry points: [`src/zeekr_ev_api/client.py`](https://github.com/fryyyyy/zeekr_ev_api/blob/main/src/zeekr_ev_api/client.py) (Zeekr client), [`src/zeekr_ev_api/network.py`](https://github.com/fryyyyy/zeekr_ev_api/blob/main/src/zeekr_ev_api/network.py) (HTTP request helpers), [`src/zeekr_ev_api/exceptions.py`](https://github.com/fryyyyy/zeekr_ev_api/blob/main/src/zeekr_ev_api/exceptions.py) (API exceptions), [`src/zeekr_ev_api/zeekr_app_sig.py`](https://github.com/fryyyyy/zeekr_ev_api/blob/main/src/zeekr_ev_api/zeekr_app_sig.py) (App signatures)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client_api["Client API"]
  node_client["Zeekr client<br/>[client.py]"]
  node_authentication["Authentication and session<br/>[client.py]"]
  node_vehicle_status["Vehicle status<br/>[client.py]"]
  node_remote_control["Remote control<br/>[client.py]"]
  node_charging["Charging plans<br/>[client.py]"]
  node_journeys["Trips and journeys<br/>[client.py]"]
end

subgraph group_request_layer["Request and Signing"]
  node_network["HTTP request helpers<br/>[network.py]"]
  node_app_signing["App signatures<br/>[zeekr_app_sig.py]"]
  node_hmac_signing["HMAC signatures<br/>[zeekr_hmac.py]"]
end

subgraph group_support["Configuration and Errors"]
  node_constants["Endpoints and defaults<br/>[const.py]"]
  node_exceptions["API exceptions<br/>[exceptions.py]"]
end

node_caller(("Library caller"))
node_zeekr_services{{"Zeekr API services"}}

node_caller -->|"uses"| node_client
node_client -->|"exposes"| node_authentication
node_client -->|"exposes"| node_vehicle_status
node_client -->|"exposes"| node_remote_control
node_client -->|"exposes"| node_charging
node_client -->|"exposes"| node_journeys
node_authentication -->|"sends requests"| node_network
node_vehicle_status -->|"requests status"| node_network
node_charging -->|"requests plans"| node_network
node_network -->|"signs HMAC"| node_hmac_signing
node_network -->|"signs requests"| node_app_signing
node_network -->|"sends HTTP"| node_zeekr_services
node_client -->|"uses endpoints"| node_constants
node_client -->|"raises errors"| node_exceptions
node_network -->|"raises auth errors"| node_exceptions

click node_client "https://github.com/fryyyyy/zeekr_ev_api/blob/main/src/zeekr_ev_api/client.py"
click node_authentication "https://github.com/fryyyyy/zeekr_ev_api/blob/main/src/zeekr_ev_api/client.py"
click node_vehicle_status "https://github.com/fryyyyy/zeekr_ev_api/blob/main/src/zeekr_ev_api/client.py"
click node_remote_control "https://github.com/fryyyyy/zeekr_ev_api/blob/main/src/zeekr_ev_api/client.py"
click node_charging "https://github.com/fryyyyy/zeekr_ev_api/blob/main/src/zeekr_ev_api/client.py"
click node_journeys "https://github.com/fryyyyy/zeekr_ev_api/blob/main/src/zeekr_ev_api/client.py"
click node_network "https://github.com/fryyyyy/zeekr_ev_api/blob/main/src/zeekr_ev_api/network.py"
click node_app_signing "https://github.com/fryyyyy/zeekr_ev_api/blob/main/src/zeekr_ev_api/zeekr_app_sig.py"
click node_hmac_signing "https://github.com/fryyyyy/zeekr_ev_api/blob/main/src/zeekr_ev_api/zeekr_hmac.py"
click node_constants "https://github.com/fryyyyy/zeekr_ev_api/blob/main/src/zeekr_ev_api/const.py"
click node_exceptions "https://github.com/fryyyyy/zeekr_ev_api/blob/main/src/zeekr_ev_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_authentication,node_vehicle_status,node_remote_control,node_charging,node_journeys toneBlue
class node_network,node_app_signing,node_hmac_signing toneAmber
class node_constants,node_exceptions,node_zeekr_services toneMint
class node_caller toneIndigo
```

## Components

### Client API

- [Zeekr client](https://github.com/fryyyyy/zeekr_ev_api/blob/main/src/zeekr_ev_api/client.py): `src/zeekr_ev_api/client.py`
- [Authentication and session](https://github.com/fryyyyy/zeekr_ev_api/blob/main/src/zeekr_ev_api/client.py): `src/zeekr_ev_api/client.py`
- [Vehicle status](https://github.com/fryyyyy/zeekr_ev_api/blob/main/src/zeekr_ev_api/client.py): `src/zeekr_ev_api/client.py`
- [Remote control](https://github.com/fryyyyy/zeekr_ev_api/blob/main/src/zeekr_ev_api/client.py): `src/zeekr_ev_api/client.py`
- [Charging plans](https://github.com/fryyyyy/zeekr_ev_api/blob/main/src/zeekr_ev_api/client.py): `src/zeekr_ev_api/client.py`
- [Trips and journeys](https://github.com/fryyyyy/zeekr_ev_api/blob/main/src/zeekr_ev_api/client.py): `src/zeekr_ev_api/client.py`

### Request and Signing

- [HTTP request helpers](https://github.com/fryyyyy/zeekr_ev_api/blob/main/src/zeekr_ev_api/network.py): `src/zeekr_ev_api/network.py`
- [App signatures](https://github.com/fryyyyy/zeekr_ev_api/blob/main/src/zeekr_ev_api/zeekr_app_sig.py): `src/zeekr_ev_api/zeekr_app_sig.py`
- [HMAC signatures](https://github.com/fryyyyy/zeekr_ev_api/blob/main/src/zeekr_ev_api/zeekr_hmac.py): `src/zeekr_ev_api/zeekr_hmac.py`

### Configuration and Errors

- [Endpoints and defaults](https://github.com/fryyyyy/zeekr_ev_api/blob/main/src/zeekr_ev_api/const.py): `src/zeekr_ev_api/const.py`
- [API exceptions](https://github.com/fryyyyy/zeekr_ev_api/blob/main/src/zeekr_ev_api/exceptions.py): `src/zeekr_ev_api/exceptions.py`

### Other components

- **Library caller**
- **Zeekr API services**

## Connections

- Library caller → Zeekr client: uses (evidence: `README.md`)
- Zeekr client → Authentication and session: exposes (evidence: `src/zeekr_ev_api/client.py`)
- Zeekr client → Vehicle status: exposes (evidence: `src/zeekr_ev_api/client.py`)
- Zeekr client → Remote control: exposes (evidence: `src/zeekr_ev_api/client.py`)
- Zeekr client → Charging plans: exposes (evidence: `src/zeekr_ev_api/client.py`)
- Zeekr client → Trips and journeys: exposes (evidence: `src/zeekr_ev_api/client.py`)
- Authentication and session → HTTP request helpers: sends requests (evidence: `src/zeekr_ev_api/client.py`)
- Vehicle status → HTTP request helpers: requests status (evidence: `src/zeekr_ev_api/client.py`)
- Charging plans → HTTP request helpers: requests plans (evidence: `src/zeekr_ev_api/client.py`)
- HTTP request helpers → HMAC signatures: signs HMAC (evidence: `src/zeekr_ev_api/network.py`)
- HTTP request helpers → App signatures: signs requests (evidence: `src/zeekr_ev_api/network.py`)
- HTTP request helpers → Zeekr API services: sends HTTP (evidence: `src/zeekr_ev_api/network.py`)
- Zeekr client → Endpoints and defaults: uses endpoints (evidence: `src/zeekr_ev_api/client.py`)
- Zeekr client → API exceptions: raises errors (evidence: `src/zeekr_ev_api/client.py`)
- HTTP request helpers → API exceptions: raises auth errors (evidence: `src/zeekr_ev_api/network.py`)
