Lu Xianghui hace 5 días
commit
e14ebb5507

+ 11 - 0
.gitignore

@@ -0,0 +1,11 @@
+# Python-generated files
+__pycache__/
+*.py[oc]
+build/
+dist/
+wheels/
+*.egg-info
+
+# Virtual environments
+.venv
+.git

+ 1 - 0
.python-version

@@ -0,0 +1 @@
+3.12

+ 81 - 0
README.md

@@ -0,0 +1,81 @@
+# Data Collector Gateway
+
+基于 FastAPI 的 Modbus TCP HTTP 网关,用于通过 HTTP 接口读取 Modbus TCP 设备。
+
+## 环境要求
+
+- Python 3.12+
+
+## 安装
+
+```bash
+uv sync
+```
+
+## 功能
+
+- 原始 Modbus 读取,返回 Modbus Poll 风格的 `Tx/Rx` 通信报文
+- 点位读取,并支持常见寄存器类型的数据转换
+- 支持 Modbus 功能码 `1=线圈输入`、`2=离散量输入`、`3=保持寄存器`、`4=输入寄存器`
+
+## 运行
+
+```bash
+uvicorn main:app --host 0.0.0.0 --port 8000
+```
+
+## 接口
+
+基础路径:`/api/dc-gateway`
+
+| 方法 | 路径 | 说明 |
+|---|---|---|
+| `GET` | `/health` | 健康检查 |
+| `POST` | `/modbus/read` | 原始 Modbus 读取,返回 `communication` 报文 |
+| `POST` | `/modbus/read_points` | 读取点位并返回转换后的值 |
+
+示例:
+
+```bash
+curl -X POST http://127.0.0.1:8000/api/dc-gateway/modbus/read \
+  -H "Content-Type: application/json" \
+  -d '{
+    "device_type": "ModbusTCP",
+    "ip": "192.168.75.240",
+    "port": 505,
+    "word_byte_order": "ABCD",
+    "address_base": 0,
+    "slave_id": 1,
+    "read": {
+      "function_code": 3,
+      "address": 0,
+      "quantity": 4
+    }
+  }'
+```
+
+完整请求和响应约定见 [docs/modbus-http-api.md](docs/modbus-http-api.md)。
+
+## 测试
+
+编译检查:
+
+```bash
+python -m compileall app main.py
+```
+
+集成测试:
+
+```bash
+python -m unittest discover -s intergration/modbus -p "test_*.py"
+```
+
+环境变量:
+
+| 名称 | 默认值 |
+|---|---|
+| `DATA_COLLECTOR_BASE_URL` | `http://127.0.0.1:8000` |
+| `MODBUS_DEVICE_IP` | `192.168.75.240` |
+| `MODBUS_TCP_PORT` | `505` |
+| `MODBUS_SLAVE_ID` | `1` |
+| `REQUEST_TIMEOUT` | `20` |

+ 0 - 0
app/__init__.py


+ 0 - 0
app/api/__init__.py


+ 25 - 0
app/api/modbus.py

@@ -0,0 +1,25 @@
+from typing import Any
+
+from fastapi import APIRouter
+
+from app.schemas.modbus import ModbusPointReadRequest, ModbusRawReadRequest
+from app.services.modbus_service import read_points, read_raw
+
+
+router = APIRouter(tags=["modbus"])
+
+
+@router.get("/health")
+def health() -> dict[str, str]:
+    return {"status": "ok"}
+
+
+@router.post("/modbus/read")
+def modbus_read(request: ModbusRawReadRequest) -> dict[str, Any]:
+    return read_raw(request)
+
+
+@router.post("/modbus/read-points", include_in_schema=False)
+@router.post("/modbus/read_points")
+def modbus_read_points(request: ModbusPointReadRequest) -> dict[str, Any]:
+    return read_points(request)

+ 46 - 0
app/main.py

@@ -0,0 +1,46 @@
+from fastapi import FastAPI, Request
+from fastapi.exceptions import RequestValidationError
+from fastapi.responses import JSONResponse
+
+from app.api.modbus import router as modbus_router
+from app.response import response_payload
+
+
+def validation_error_message(exc: RequestValidationError) -> str:
+    messages: list[str] = []
+    for error in exc.errors():
+        location = ".".join(str(item) for item in error.get("loc", []) if item != "body")
+        message = error.get("msg", "validation error")
+        messages.append(f"{location}: {message}" if location else message)
+    return "; ".join(messages) or "validation error"
+
+
+def create_app() -> FastAPI:
+    app = FastAPI(title="Data Collector Gateway")
+    app.include_router(modbus_router, prefix="/api/dc-gateway")
+
+    @app.exception_handler(RequestValidationError)
+    async def request_validation_exception_handler(
+        request: Request,
+        exc: RequestValidationError,
+    ) -> JSONResponse:
+        data: dict[str, list] = {}
+        if request.url.path.endswith("/modbus/read"):
+            data = {"communication": []}
+        elif request.url.path.endswith(("/modbus/read_points", "/modbus/read-points")):
+            data = {"points": []}
+        return JSONResponse(
+            status_code=200,
+            content=response_payload(1, validation_error_message(exc), data),
+        )
+
+    return app
+
+
+app = create_app()
+
+
+def main() -> None:
+    import uvicorn
+
+    uvicorn.run(app, host="0.0.0.0", port=8000)

+ 5 - 0
app/response.py

@@ -0,0 +1,5 @@
+from typing import Any
+
+
+def response_payload(code: int, msg: str, data: dict[str, Any]) -> dict[str, Any]:
+    return {"code": code, "msg": msg, "data": data}

+ 0 - 0
app/schemas/__init__.py


+ 93 - 0
app/schemas/modbus.py

@@ -0,0 +1,93 @@
+from ipaddress import ip_address
+from typing import Literal
+
+from pydantic import BaseModel, ConfigDict, Field, field_validator, model_validator
+
+
+SUPPORTED_FUNCTION_CODES = {1, 2, 3, 4}
+SUPPORTED_POINT_TYPES = {
+    "bool",
+    "int16",
+    "uint16",
+    "int32",
+    "uint32",
+    "int64",
+    "uint64",
+    "float32",
+    "float64",
+}
+
+
+class ModbusBaseRequest(BaseModel):
+    model_config = ConfigDict(extra="forbid")
+
+    device_type: Literal["ModbusTCP"] = "ModbusTCP"
+    ip: str = Field(min_length=1)
+    port: int = Field(ge=1, le=65535)
+    word_byte_order: Literal["ABCD", "BADC", "CDAB", "DCBA"] = "ABCD"
+    address_base: int = Field(default=0, ge=0)
+    slave_id: int = Field(default=1, ge=0, le=247)
+
+    @field_validator("ip")
+    @classmethod
+    def validate_ip(cls, value: str) -> str:
+        try:
+            ip_address(value)
+        except ValueError as exc:
+            raise ValueError("ip must be a valid IP address") from exc
+        return value
+
+
+class ModbusReadSpec(BaseModel):
+    model_config = ConfigDict(extra="forbid")
+
+    function_code: int
+    address: int = Field(ge=0)
+    quantity: int = Field(ge=1, le=125)
+
+    @field_validator("function_code")
+    @classmethod
+    def validate_function_code(cls, value: int) -> int:
+        if value not in SUPPORTED_FUNCTION_CODES:
+            raise ValueError("function_code must be one of 1, 2, 3, 4")
+        return value
+
+
+class ModbusRawReadRequest(ModbusBaseRequest):
+    read: ModbusReadSpec
+
+
+class ModbusPointSpec(BaseModel):
+    model_config = ConfigDict(extra="forbid")
+
+    function_code: int
+    address: int = Field(ge=0)
+    type: str
+    bit: int | None = Field(default=None, ge=0, le=15)
+
+    @field_validator("function_code")
+    @classmethod
+    def validate_function_code(cls, value: int) -> int:
+        if value not in SUPPORTED_FUNCTION_CODES:
+            raise ValueError("function_code must be one of 1, 2, 3, 4")
+        return value
+
+    @field_validator("type")
+    @classmethod
+    def validate_type(cls, value: str) -> str:
+        normalized = value.lower()
+        if normalized not in SUPPORTED_POINT_TYPES:
+            raise ValueError("type must be one of bool, int16, uint16, int32, uint32, int64, uint64, float32, float64")
+        return normalized
+
+    @model_validator(mode="after")
+    def validate_point(self) -> "ModbusPointSpec":
+        if self.function_code in {1, 2} and self.type != "bool":
+            raise ValueError("function_code 1 and 2 only support bool points")
+        if self.function_code in {1, 2} and self.bit is not None:
+            raise ValueError("bit is only supported for register points")
+        return self
+
+
+class ModbusPointReadRequest(ModbusBaseRequest):
+    points: list[ModbusPointSpec] = Field(min_length=1)

+ 0 - 0
app/services/__init__.py


+ 51 - 0
app/services/modbus_codec.py

@@ -0,0 +1,51 @@
+from __future__ import annotations
+
+import struct
+from typing import Any
+
+
+def register_quantity_for_type(point_type: str) -> int:
+    if point_type in {"bool", "int16", "uint16"}:
+        return 1
+    if point_type in {"int64", "uint64", "float64"}:
+        return 4
+    return 2
+
+
+def ordered_bytes(registers: list[int], word_byte_order: str) -> bytes:
+    raw = b"".join(register.to_bytes(2, byteorder="big", signed=False) for register in registers)
+    words = [raw[index : index + 2] for index in range(0, len(raw), 2)]
+    if word_byte_order in {"BADC", "DCBA"}:
+        words = [word[::-1] for word in words]
+    if word_byte_order in {"CDAB", "DCBA"}:
+        words = list(reversed(words))
+    return b"".join(words)
+
+
+def convert_register_value(registers: list[int], point_type: str, word_byte_order: str, bit: int | None) -> Any:
+    if point_type == "bool":
+        value = registers[0]
+        if bit is None:
+            return value != 0
+        return ((value >> bit) & 1) == 1
+
+    payload = ordered_bytes(registers, word_byte_order)
+
+    if point_type == "int16":
+        return int.from_bytes(payload, byteorder="big", signed=True)
+    if point_type == "uint16":
+        return int.from_bytes(payload, byteorder="big", signed=False)
+    if point_type == "int32":
+        return int.from_bytes(payload, byteorder="big", signed=True)
+    if point_type == "uint32":
+        return int.from_bytes(payload, byteorder="big", signed=False)
+    if point_type == "int64":
+        return int.from_bytes(payload, byteorder="big", signed=True)
+    if point_type == "uint64":
+        return int.from_bytes(payload, byteorder="big", signed=False)
+    if point_type == "float32":
+        return struct.unpack(">f", payload)[0]
+    if point_type == "float64":
+        return struct.unpack(">d", payload)[0]
+
+    raise ValueError(f"unsupported point type: {point_type}")

+ 160 - 0
app/services/modbus_service.py

@@ -0,0 +1,160 @@
+from __future__ import annotations
+
+from collections.abc import Callable
+from typing import Any
+
+from pymodbus.client import ModbusTcpClient
+
+from app.response import response_payload
+from app.schemas.modbus import ModbusPointReadRequest, ModbusRawReadRequest
+from app.services.modbus_codec import convert_register_value, register_quantity_for_type
+
+
+class ModbusCommunicationError(RuntimeError):
+    def __init__(self, message: str) -> None:
+        super().__init__(message)
+
+
+class PacketTrace:
+    def __init__(self) -> None:
+        self._sequence = 0
+        self._messages: list[str] = []
+
+    def capture(self, sending: bool, data: bytes) -> bytes:
+        self._sequence += 1
+        direction = "Tx" if sending else "Rx"
+        payload = " ".join(f"{value:02X}" for value in data)
+        self._messages.append(f"{direction}:{self._sequence:03d}-{payload}")
+        return data
+
+    def as_list(self) -> list[str]:
+        return list(self._messages)
+
+
+def calculate_protocol_address(address: int, address_base: int) -> int:
+    return address + address_base
+
+
+def function_name(function_code: int) -> str:
+    return {
+        1: "read_coils",
+        2: "read_discrete_inputs",
+        3: "read_holding_registers",
+        4: "read_input_registers",
+    }[function_code]
+
+
+def create_client(ip: str, port: int, trace_packet: Callable[[bool, bytes], bytes]) -> ModbusTcpClient:
+    client = ModbusTcpClient(host=ip, port=port, trace_packet=trace_packet)
+    if not client.connect():
+        raise ModbusCommunicationError(f"failed to connect to {ip}:{port}")
+    return client
+
+
+def read_modbus_values(
+    client: ModbusTcpClient,
+    function_code: int,
+    protocol_address: int,
+    quantity: int,
+    slave_id: int,
+) -> list[int] | list[bool]:
+    if function_code == 1:
+        response = client.read_coils(address=protocol_address, count=quantity, device_id=slave_id)
+    elif function_code == 2:
+        response = client.read_discrete_inputs(address=protocol_address, count=quantity, device_id=slave_id)
+    elif function_code == 3:
+        response = client.read_holding_registers(address=protocol_address, count=quantity, device_id=slave_id)
+    elif function_code == 4:
+        response = client.read_input_registers(address=protocol_address, count=quantity, device_id=slave_id)
+    else:
+        raise ValueError("function_code must be one of 1, 2, 3, 4")
+
+    if response.isError():
+        raise ModbusCommunicationError(str(response))
+
+    if function_code in {1, 2}:
+        return [bool(value) for value in response.bits[:quantity]]
+    return [int(value) for value in response.registers[:quantity]]
+
+
+def device_payload(request: ModbusRawReadRequest | ModbusPointReadRequest) -> dict[str, Any]:
+    return {
+        "device_type": request.device_type,
+        "ip": request.ip,
+        "port": request.port,
+        "word_byte_order": request.word_byte_order,
+        "address_base": request.address_base,
+        "slave_id": request.slave_id,
+    }
+
+
+def read_raw(request: ModbusRawReadRequest) -> dict[str, Any]:
+    trace = PacketTrace()
+    client: ModbusTcpClient | None = None
+
+    try:
+        client = create_client(request.ip, request.port, trace.capture)
+        read_modbus_values(
+            client=client,
+            function_code=request.read.function_code,
+            protocol_address=calculate_protocol_address(request.read.address, request.address_base),
+            quantity=request.read.quantity,
+            slave_id=request.slave_id,
+        )
+    except ModbusCommunicationError as exc:
+        return response_payload(1, str(exc), {"device": device_payload(request), "communication": trace.as_list()})
+    except Exception as exc:
+        return response_payload(1, str(exc), {"device": device_payload(request), "communication": trace.as_list()})
+    finally:
+        if client is not None:
+            client.close()
+
+    return response_payload(0, "success", {"device": device_payload(request), "communication": trace.as_list()})
+
+
+def read_points(request: ModbusPointReadRequest) -> dict[str, Any]:
+    trace = PacketTrace()
+    client: ModbusTcpClient | None = None
+    points: list[dict[str, Any]] = []
+
+    try:
+        client = create_client(request.ip, request.port, trace.capture)
+        for point in request.points:
+            quantity = register_quantity_for_type(point.type)
+            protocol_address = calculate_protocol_address(point.address, request.address_base)
+            raw_values = read_modbus_values(
+                client=client,
+                function_code=point.function_code,
+                protocol_address=protocol_address,
+                quantity=quantity,
+                slave_id=request.slave_id,
+            )
+
+            if point.function_code in {1, 2}:
+                value = bool(raw_values[0])
+            else:
+                value = convert_register_value(
+                    registers=[int(value) for value in raw_values],
+                    point_type=point.type,
+                    word_byte_order=request.word_byte_order,
+                    bit=point.bit,
+                )
+
+            result = {
+                "function_code": point.function_code,
+                "address": point.address,
+                "type": point.type,
+                "value": value,
+            }
+            if point.bit is not None:
+                result["bit"] = point.bit
+            points.append(result)
+    except ModbusCommunicationError as exc:
+        return response_payload(1, str(exc), {"device": device_payload(request), "points": points})
+    except Exception as exc:
+        return response_payload(1, str(exc), {"device": device_payload(request), "points": points})
+    finally:
+        if client is not None:
+            client.close()
+
+    return response_payload(0, "success", {"device": device_payload(request), "points": points})

+ 328 - 0
docs/modbus-http-api.md

@@ -0,0 +1,328 @@
+# Modbus HTTP 接口说明
+
+## 目标
+
+本服务通过 HTTP 接口连接 Modbus TCP 设备,并返回与 Modbus Poll `Communication` 窗口一致风格的原始 Tx/Rx 报文。
+
+当前仅支持 `ModbusTCP`。
+
+## 接口列表
+
+- `POST /api/dc-gateway/modbus/read`:原始 Modbus 读取,只返回通信报文,不返回解析值。
+- `POST /api/dc-gateway/modbus/read_points`:按点位定义读取,返回点位值。
+- `GET /api/dc-gateway/health`:健康检查。
+
+## 通用返回约定
+
+接口业务结果统一使用 HTTP `200` 返回,是否成功由 JSON 中的 `code` 判断。
+
+成功:
+
+```json
+{
+  "code": 0,
+  "msg": "success",
+  "data": {}
+}
+```
+
+失败:
+
+```json
+{
+  "code": 1,
+  "msg": "failed to connect to 192.168.75.240:505",
+  "data": {}
+}
+```
+
+`data` 固定为对象。两个 Modbus 读取接口都会在 `data.device` 返回设备信息;`/modbus/read` 的通信报文返回在 `data.communication`;`/modbus/read_points` 的点位返回在 `data.points`。
+
+## 设备参数校验
+
+| 字段 | 是否必传 | 校验 |
+|---|---|---|
+| `device_type` | 否 | 默认 `ModbusTCP`,目前仅支持 `ModbusTCP` |
+| `ip` | 是 | 必须是合法 IP 地址 |
+| `port` | 是 | `1 <= port <= 65535` |
+| `word_byte_order` | 否 | 默认 `ABCD`,可选 `ABCD`、`BADC`、`CDAB`、`DCBA` |
+| `address_base` | 否 | 默认 `0`,必须大于等于 `0` |
+| `slave_id` | 否 | 默认 `1`,范围 `0..247` |
+
+## communication 格式
+
+`communication` 是字符串数组,每项格式如下:
+
+```text
+Tx:001-00 00 33 00 00 00 06 01 03 00 00 00 04
+Rx:002-00 00 33 00 00 00 0B 01 03 08 00 01 42 A8 00 00 40 F8
+```
+
+说明:
+
+- `Tx` 表示发送给设备的 Modbus TCP ADU。
+- `Rx` 表示设备返回的 Modbus TCP ADU。
+- `001`、`002` 是当前 HTTP 请求内的报文序号。
+- `-` 后面是大写十六进制字节,使用空格分隔。
+- 每个 HTTP 请求都会创建独立 trace,不使用全局 trace,并发请求不会互相清空或串包。
+- 若 pymodbus 因重试产生多次发送/接收,数组会包含多条 `Tx/Rx`。
+
+## 地址规则
+
+接口只按照入参格式处理地址。`address_base` 作为显式地址偏移,实际发送给 Modbus 协议的地址为:
+
+```python
+protocol_address = address + address_base
+```
+
+常规情况下传:
+
+```json
+"address_base": 0
+```
+
+## Function Code
+
+支持以下功能码:
+
+| function_code | 含义 |
+|---:|---|
+| 1 | 读线圈 Read Coils |
+| 2 | 读离散输入 Read Discrete Inputs |
+| 3 | 读保持寄存器 Read Holding Registers |
+| 4 | 读输入寄存器 Read Input Registers |
+
+## 读取数量限制
+
+`/api/dc-gateway/modbus/read` 的 `quantity` 范围为:
+
+```text
+1 <= quantity <= 125
+```
+
+超过范围不会返回 HTTP `422`,而是返回:
+
+```json
+{
+  "code": 1,
+  "msg": "read.quantity: Input should be less than or equal to 125",
+  "data": {
+    "communication": []
+  }
+}
+```
+
+## 接口一:原始读取
+
+### URL
+
+```http
+POST /api/dc-gateway/modbus/read
+```
+
+### 请求体
+
+```json
+{
+  "device_type": "ModbusTCP",
+  "ip": "192.168.75.240",
+  "port": 505,
+  "word_byte_order": "ABCD",
+  "address_base": 0,
+  "slave_id": 1,
+  "read": {
+    "function_code": 3,
+    "address": 0,
+    "quantity": 4
+  }
+}
+```
+
+### 成功返回
+
+```json
+{
+  "code": 0,
+  "msg": "success",
+  "data": {
+    "device": {
+      "device_type": "ModbusTCP",
+      "ip": "192.168.75.240",
+      "port": 505,
+      "word_byte_order": "ABCD",
+      "address_base": 0,
+      "slave_id": 1
+    },
+    "communication": [
+      "Tx:001-00 00 33 00 00 00 06 01 03 00 00 00 04",
+      "Rx:002-00 00 33 00 00 00 0B 01 03 08 00 01 42 A8 00 00 40 F8"
+    ]
+  }
+}
+```
+
+该接口不返回 `values`。如果需要按 `int16`、`float32` 等类型解析数据,请使用点位读取接口。
+
+### 错误返回
+
+```json
+{
+  "code": 1,
+  "msg": "Modbus Error: [Input/Output] No response received after 3 retries, continue with next request",
+  "data": {
+    "device": {
+      "device_type": "ModbusTCP",
+      "ip": "192.168.75.240",
+      "port": 505,
+      "word_byte_order": "ABCD",
+      "address_base": 0,
+      "slave_id": 1
+    },
+    "communication": [
+      "Tx:001-00 00 33 00 00 00 06 01 03 00 00 00 04"
+    ]
+  }
+}
+```
+
+## 接口二:点位读取并转换
+
+### URL
+
+```http
+POST /api/dc-gateway/modbus/read_points
+```
+
+### 请求体
+
+```json
+{
+  "device_type": "ModbusTCP",
+  "ip": "192.168.75.240",
+  "port": 505,
+  "word_byte_order": "ABCD",
+  "address_base": 0,
+  "slave_id": 1,
+  "points": [
+    {
+      "function_code": 3,
+      "address": 7,
+      "type": "int16"
+    },
+    {
+      "function_code": 3,
+      "address": 1,
+      "type": "float32"
+    },
+    {
+      "function_code": 1,
+      "address": 0,
+      "type": "bool"
+    }
+  ]
+}
+```
+
+### 支持的数据类型
+
+| 类型 | 读取长度 | 说明 |
+|---|---:|---|
+| `bool` | 1 bit 或 1 register | 布尔值 |
+| `int16` | 1 register | 有符号 16 位整数 |
+| `uint16` | 1 register | 无符号 16 位整数 |
+| `int32` | 2 registers | 有符号 32 位整数 |
+| `uint32` | 2 registers | 无符号 32 位整数 |
+| `float32` | 2 registers | IEEE 754 单精度浮点数 |
+| `int64` | 4 registers | 有符号 64 位整数 |
+| `uint64` | 4 registers | 无符号 64 位整数 |
+| `float64` | 4 registers | IEEE 754 双精度浮点数 |
+
+### 成功返回
+
+```json
+{
+  "code": 0,
+  "msg": "success",
+  "data": {
+    "device": {
+      "device_type": "ModbusTCP",
+      "ip": "192.168.75.240",
+      "port": 505,
+      "word_byte_order": "ABCD",
+      "address_base": 0,
+      "slave_id": 1
+    },
+    "points": [
+      {
+        "function_code": 3,
+        "address": 7,
+        "type": "int16",
+        "value": -321
+      }
+    ]
+  }
+}
+```
+
+## 运行方式
+
+```bash
+uvicorn main:app --host 0.0.0.0 --port 8000
+```
+
+也可以直接运行:
+
+```bash
+python main.py
+```
+
+## 验证方式
+
+编译检查:
+
+```bash
+python -m compileall app main.py
+```
+
+调用原始读取接口:
+
+```bash
+curl -X POST http://127.0.0.1:8000/api/dc-gateway/modbus/read \
+  -H "Content-Type: application/json" \
+  -d '{
+    "device_type": "ModbusTCP",
+    "ip": "192.168.75.240",
+    "port": 505,
+    "word_byte_order": "ABCD",
+    "address_base": 0,
+    "slave_id": 1,
+    "read": {
+      "function_code": 3,
+      "address": 0,
+      "quantity": 4
+    }
+  }'
+```
+
+运行接口测试:
+
+```bash
+python -m unittest discover -s intergration/modbus -p "test_*.py"
+```
+
+默认测试设备参数参考 `D:\Projects\BACnet-Client\autotest\Integration\modbus`:
+
+```text
+MODBUS_DEVICE_IP=192.168.75.240
+MODBUS_TCP_PORT=505
+MODBUS_SLAVE_ID=1
+```
+
+可通过环境变量覆盖:
+
+```bash
+set DATA_COLLECTOR_BASE_URL=http://127.0.0.1:8000
+set MODBUS_DEVICE_IP=192.168.75.240
+set MODBUS_TCP_PORT=505
+set MODBUS_SLAVE_ID=1
+```

+ 0 - 0
intergration/modbus/__init__.py


+ 110 - 0
intergration/modbus/common.py

@@ -0,0 +1,110 @@
+import json
+import os
+import re
+import urllib.error
+import urllib.request
+
+
+BASE_URL = os.getenv("DATA_COLLECTOR_BASE_URL", "http://127.0.0.1:8000").rstrip("/")
+REQUEST_TIMEOUT = int(os.getenv("REQUEST_TIMEOUT", "20"))
+
+DEVICE_IP = os.getenv("MODBUS_DEVICE_IP", "192.168.75.240")
+MODBUS_TCP_PORT = int(os.getenv("MODBUS_TCP_PORT", "505"))
+SLAVE_ID = int(os.getenv("MODBUS_SLAVE_ID", "1"))
+
+FUNC_CODE_COIL = 1
+FUNC_CODE_DISCRETE_INPUT = 2
+FUNC_CODE_HOLDING_REGISTER = 3
+FUNC_CODE_INPUT_REGISTER = 4
+
+REGISTER_POINT_SAMPLES = [
+    {"address": 0, "type": "bool", "bit": 0},
+    {"address": 1, "type": "float32"},
+    {"address": 3, "type": "float64"},
+    {"address": 7, "type": "int16"},
+    {"address": 8, "type": "uint16"},
+    {"address": 9, "type": "int32"},
+    {"address": 11, "type": "uint32"},
+    {"address": 13, "type": "int64"},
+    {"address": 17, "type": "uint64"},
+]
+
+FRAME_PATTERN = re.compile(r"^(Tx|Rx):\d{3}-[0-9A-F]{2}(?: [0-9A-F]{2})*$")
+
+
+def post_json(path: str, payload: dict) -> tuple[int, dict]:
+    data = json.dumps(payload).encode("utf-8")
+    request = urllib.request.Request(
+        f"{BASE_URL}{path}",
+        data=data,
+        headers={"Content-Type": "application/json"},
+        method="POST",
+    )
+    try:
+        with urllib.request.urlopen(request, timeout=REQUEST_TIMEOUT) as response:
+            body = response.read().decode("utf-8")
+            return response.status, json.loads(body)
+    except urllib.error.HTTPError as exc:
+        body = exc.read().decode("utf-8")
+        return exc.code, json.loads(body)
+
+
+def raw_read_payload(function_code: int, address: int, quantity: int) -> dict:
+    return {
+        "device_type": "ModbusTCP",
+        "ip": DEVICE_IP,
+        "port": MODBUS_TCP_PORT,
+        "word_byte_order": "ABCD",
+        "address_base": 0,
+        "slave_id": SLAVE_ID,
+        "read": {
+            "function_code": function_code,
+            "address": address,
+            "quantity": quantity,
+        },
+    }
+
+
+def point_read_payload(points: list[dict]) -> dict:
+    return {
+        "device_type": "ModbusTCP",
+        "ip": DEVICE_IP,
+        "port": MODBUS_TCP_PORT,
+        "word_byte_order": "ABCD",
+        "address_base": 0,
+        "slave_id": SLAVE_ID,
+        "points": points,
+    }
+
+
+def all_type_point_specs() -> list[dict]:
+    points = []
+    for function_code in [FUNC_CODE_COIL, FUNC_CODE_DISCRETE_INPUT]:
+        for address in [0, 1, 16, 17]:
+            points.append({"function_code": function_code, "address": address, "type": "bool"})
+    for function_code in [FUNC_CODE_HOLDING_REGISTER, FUNC_CODE_INPUT_REGISTER]:
+        for sample in REGISTER_POINT_SAMPLES:
+            point = {"function_code": function_code, "address": sample["address"], "type": sample["type"]}
+            if "bit" in sample:
+                point["bit"] = sample["bit"]
+            points.append(point)
+    return points
+
+
+def parse_frame(frame: str) -> tuple[str, list[int]]:
+    direction, payload = frame.split("-", 1)
+    return direction[:2], [int(item, 16) for item in payload.split()]
+
+
+def assert_response_contract(testcase, status: int, data: dict) -> None:
+    testcase.assertEqual(200, status, data)
+    testcase.assertIn("code", data)
+    testcase.assertIn("msg", data)
+    testcase.assertIn("data", data)
+    testcase.assertIsInstance(data["data"], dict)
+
+
+def assert_frame_format(testcase, communication: list[str]) -> None:
+    testcase.assertTrue(communication, "communication should not be empty")
+    for frame in communication:
+        testcase.assertRegex(frame, FRAME_PATTERN)

+ 108 - 0
intergration/modbus/test_modbus_read_api.py

@@ -0,0 +1,108 @@
+import unittest
+
+from common import (
+    FUNC_CODE_COIL,
+    FUNC_CODE_DISCRETE_INPUT,
+    FUNC_CODE_HOLDING_REGISTER,
+    FUNC_CODE_INPUT_REGISTER,
+    all_type_point_specs,
+    assert_frame_format,
+    assert_response_contract,
+    parse_frame,
+    point_read_payload,
+    post_json,
+    raw_read_payload,
+)
+
+
+def expected_device(payload):
+    return {
+        "device_type": payload["device_type"],
+        "ip": payload["ip"],
+        "port": payload["port"],
+        "word_byte_order": payload["word_byte_order"],
+        "address_base": payload["address_base"],
+        "slave_id": payload["slave_id"],
+    }
+
+
+class ModbusReadApiIntegrationTest(unittest.TestCase):
+    def test_raw_read_returns_modbus_poll_style_communication(self):
+        payload = raw_read_payload(FUNC_CODE_HOLDING_REGISTER, address=0, quantity=4)
+        status, data = post_json(
+            "/api/dc-gateway/modbus/read",
+            payload,
+        )
+
+        assert_response_contract(self, status, data)
+        self.assertEqual(0, data["code"], data)
+        self.assertEqual("success", data["msg"])
+        self.assertNotIn("values", data)
+        self.assertNotIn("communication", data)
+        self.assertNotIn("device", data)
+        self.assertEqual(expected_device(payload), data["data"]["device"])
+        communication = data["data"]["communication"]
+        assert_frame_format(self, communication)
+
+        tx_frames = [parse_frame(frame)[1] for frame in communication if frame.startswith("Tx:")]
+        rx_frames = [parse_frame(frame)[1] for frame in communication if frame.startswith("Rx:")]
+        self.assertTrue(tx_frames, data)
+        self.assertTrue(rx_frames, data)
+
+        tx = tx_frames[0]
+        self.assertGreaterEqual(len(tx), 12)
+        self.assertEqual(FUNC_CODE_HOLDING_REGISTER, tx[7])
+        self.assertEqual([0x00, 0x00], tx[8:10])
+        self.assertEqual([0x00, 0x04], tx[10:12])
+
+        rx = rx_frames[0]
+        self.assertGreaterEqual(len(rx), 9)
+        self.assertEqual(FUNC_CODE_HOLDING_REGISTER, rx[7])
+        self.assertEqual(8, rx[8])
+
+    def test_read_points_returns_all_function_codes_and_types(self):
+        payload = point_read_payload(all_type_point_specs())
+
+        status, data = post_json("/api/dc-gateway/modbus/read_points", payload)
+
+        assert_response_contract(self, status, data)
+        self.assertEqual(0, data["code"], data)
+        self.assertNotIn("communication", data)
+        self.assertNotIn("device", data)
+        self.assertEqual(expected_device(payload), data["data"]["device"])
+        points = data["data"]["points"]
+        self.assertEqual(len(payload["points"]), len(points))
+        seen = {(point["function_code"], point["address"], point["type"], point.get("bit")) for point in points}
+        expected = {(point["function_code"], point["address"], point["type"], point.get("bit")) for point in payload["points"]}
+        self.assertEqual(expected, seen)
+        self.assertTrue(any(point["function_code"] == FUNC_CODE_COIL for point in points))
+        self.assertTrue(any(point["function_code"] == FUNC_CODE_DISCRETE_INPUT for point in points))
+        self.assertTrue(any(point["function_code"] == FUNC_CODE_HOLDING_REGISTER for point in points))
+        self.assertTrue(any(point["function_code"] == FUNC_CODE_INPUT_REGISTER for point in points))
+        for point in points:
+            self.assertIn("value", point)
+            self.assertNotIn("address_base", point)
+            self.assertNotIn("protocol_address", point)
+            self.assertNotIn("raw_values", point)
+            self.assertNotIn("communication", point)
+            if point["type"] == "bool":
+                self.assertIsInstance(point["value"], bool)
+            elif point["type"].startswith("float"):
+                self.assertIsInstance(point["value"], float)
+            else:
+                self.assertIsInstance(point["value"], int)
+
+    def test_validation_error_returns_http_200_contract(self):
+        status, data = post_json(
+            "/api/dc-gateway/modbus/read",
+            raw_read_payload(FUNC_CODE_HOLDING_REGISTER, address=0, quantity=126),
+        )
+
+        assert_response_contract(self, status, data)
+        self.assertEqual(1, data["code"], data)
+        self.assertIn("quantity", data["msg"])
+        self.assertEqual([], data["data"]["communication"])
+
+
+if __name__ == "__main__":
+    unittest.main()

+ 39 - 0
intergration/modbus/test_modbus_schema.py

@@ -0,0 +1,39 @@
+import unittest
+
+from pydantic import ValidationError
+
+from app.schemas.modbus import ModbusRawReadRequest
+
+
+class ModbusSchemaTest(unittest.TestCase):
+    def test_device_type_defaults_to_modbus_tcp(self):
+        request = ModbusRawReadRequest(
+            ip="192.168.75.248",
+            port=5512,
+            read={"function_code": 3, "address": 0, "quantity": 10},
+        )
+
+        self.assertEqual("ModbusTCP", request.device_type)
+
+    def test_port_is_required(self):
+        with self.assertRaises(ValidationError) as context:
+            ModbusRawReadRequest(
+                ip="192.168.75.248",
+                read={"function_code": 3, "address": 0, "quantity": 10},
+            )
+
+        self.assertIn("port", str(context.exception))
+
+    def test_ip_must_be_valid_address(self):
+        with self.assertRaises(ValidationError) as context:
+            ModbusRawReadRequest(
+                ip="not-an-ip",
+                port=5512,
+                read={"function_code": 3, "address": 0, "quantity": 10},
+            )
+
+        self.assertIn("ip must be a valid IP address", str(context.exception))
+
+
+if __name__ == "__main__":
+    unittest.main()

+ 5 - 0
main.py

@@ -0,0 +1,5 @@
+from app.main import app, main
+
+
+if __name__ == "__main__":
+    main()

+ 15 - 0
pyproject.toml

@@ -0,0 +1,15 @@
+[project]
+name = "data-collector-gateway"
+version = "0.1.0"
+description = "Add your description here"
+readme = "README.md"
+requires-python = ">=3.12"
+dependencies = [
+    "fastapi>=0.115.0",
+    "pydantic>=2.13.4",
+    "pymodbus>=3.13.1",
+    "uvicorn>=0.32.0",
+]
+
+[project.scripts]
+data-collector-api = "main:main"

+ 254 - 0
uv.lock

@@ -0,0 +1,254 @@
+version = 1
+revision = 2
+requires-python = ">=3.12"
+
+[[package]]
+name = "annotated-doc"
+version = "0.0.4"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/57/ba/046ceea27344560984e26a590f90bc7f4a75b06701f653222458922b558c/annotated_doc-0.0.4.tar.gz", hash = "sha256:fbcda96e87e9c92ad167c2e53839e57503ecfda18804ea28102353485033faa4", size = 7288, upload-time = "2025-11-10T22:07:42.062Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/1e/d3/26bf1008eb3d2daa8ef4cacc7f3bfdc11818d111f7e2d0201bc6e3b49d45/annotated_doc-0.0.4-py3-none-any.whl", hash = "sha256:571ac1dc6991c450b25a9c2d84a3705e2ae7a53467b5d111c24fa8baabbed320", size = 5303, upload-time = "2025-11-10T22:07:40.673Z" },
+]
+
+[[package]]
+name = "annotated-types"
+version = "0.7.0"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz", hash = "sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89", size = 16081, upload-time = "2024-05-20T21:33:25.928Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/78/b6/6307fbef88d9b5ee7421e68d78a9f162e0da4900bc5f5793f6d3d0e34fb8/annotated_types-0.7.0-py3-none-any.whl", hash = "sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53", size = 13643, upload-time = "2024-05-20T21:33:24.1Z" },
+]
+
+[[package]]
+name = "anyio"
+version = "4.13.0"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+    { name = "idna" },
+    { name = "typing-extensions", marker = "python_full_version < '3.13'" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/19/14/2c5dd9f512b66549ae92767a9c7b330ae88e1932ca57876909410251fe13/anyio-4.13.0.tar.gz", hash = "sha256:334b70e641fd2221c1505b3890c69882fe4a2df910cba14d97019b90b24439dc", size = 231622, upload-time = "2026-03-24T12:59:09.671Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/da/42/e921fccf5015463e32a3cf6ee7f980a6ed0f395ceeaa45060b61d86486c2/anyio-4.13.0-py3-none-any.whl", hash = "sha256:08b310f9e24a9594186fd75b4f73f4a4152069e3853f1ed8bfbf58369f4ad708", size = 114353, upload-time = "2026-03-24T12:59:08.246Z" },
+]
+
+[[package]]
+name = "click"
+version = "8.4.1"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+    { name = "colorama", marker = "sys_platform == 'win32'" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/9b/98/518d8e5081007684232226f475082b30087d0f585e8457db087298259f49/click-8.4.1.tar.gz", hash = "sha256:918b5633eddf6b41c32d4f454bf0de810065c74e3f7dbf8ee5452f8be88d3e96", size = 353007, upload-time = "2026-05-22T04:08:37.769Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/c7/0d/67e5b4109ea4a837e80daa87c2c696711955e40449a97e8926672534def2/click-8.4.1-py3-none-any.whl", hash = "sha256:482be17c6991b8c19c5429a1e995d9b0efdbb63172824c41f99965dc0ade8ec2", size = 116639, upload-time = "2026-05-22T04:08:35.26Z" },
+]
+
+[[package]]
+name = "colorama"
+version = "0.4.6"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697, upload-time = "2022-10-25T02:36:22.414Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload-time = "2022-10-25T02:36:20.889Z" },
+]
+
+[[package]]
+name = "data-collector-gateway"
+version = "0.1.0"
+source = { virtual = "." }
+dependencies = [
+    { name = "fastapi" },
+    { name = "pydantic" },
+    { name = "pymodbus" },
+    { name = "uvicorn" },
+]
+
+[package.metadata]
+requires-dist = [
+    { name = "fastapi", specifier = ">=0.115.0" },
+    { name = "pydantic", specifier = ">=2.13.4" },
+    { name = "pymodbus", specifier = ">=3.13.1" },
+    { name = "uvicorn", specifier = ">=0.32.0" },
+]
+
+[[package]]
+name = "fastapi"
+version = "0.137.0"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+    { name = "annotated-doc" },
+    { name = "pydantic" },
+    { name = "starlette" },
+    { name = "typing-extensions" },
+    { name = "typing-inspection" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/da/fe/fb25c287ff7e0f79fc6acf2e8b812725dad28d2a1446c0410bab1422ac90/fastapi-0.137.0.tar.gz", hash = "sha256:d0565d551f65a803ecff245390840867186f456ef98971f750724eed16e1541c", size = 408023, upload-time = "2026-06-14T12:51:30.672Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/e7/f1/b38481428e50131e5345b535414d11d196f14990122fe69c9020c64e5683/fastapi-0.137.0-py3-none-any.whl", hash = "sha256:6dcbde8d464f92117c1accb9e42720f8e423fa9b86cb563b1f5862f785a06498", size = 121777, upload-time = "2026-06-14T12:51:29.067Z" },
+]
+
+[[package]]
+name = "h11"
+version = "0.16.0"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz", hash = "sha256:4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1", size = 101250, upload-time = "2025-04-24T03:35:25.427Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/04/4b/29cac41a4d98d144bf5f6d33995617b185d14b22401f75ca86f384e87ff1/h11-0.16.0-py3-none-any.whl", hash = "sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86", size = 37515, upload-time = "2025-04-24T03:35:24.344Z" },
+]
+
+[[package]]
+name = "idna"
+version = "3.18"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/cd/63/9496c57188a2ee585e0f1db071d75089a11e98aa86eb99d9d7618fc1edce/idna-3.18.tar.gz", hash = "sha256:ffb385a7e039654cef1ab9ef32c6fafe283c0c0467bba1d9029738ce4a14a848", size = 196711, upload-time = "2026-06-02T14:34:07.794Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/1e/5e/d4e9f1a599fb8e573b7b87160658329fbf28d19eac2718f51fc3def3aa5a/idna-3.18-py3-none-any.whl", hash = "sha256:7f952cbe720b688055e3f87de14f5c3e5fdaa8bc3928985c4077ca689de849a2", size = 65455, upload-time = "2026-06-02T14:34:06.319Z" },
+]
+
+[[package]]
+name = "pydantic"
+version = "2.13.4"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+    { name = "annotated-types" },
+    { name = "pydantic-core" },
+    { name = "typing-extensions" },
+    { name = "typing-inspection" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/18/a5/b60d21ac674192f8ab0ba4e9fd860690f9b4a6e51ca5df118733b487d8d6/pydantic-2.13.4.tar.gz", hash = "sha256:c40756b57adaa8b1efeeced5c196f3f3b7c435f90e84ea7f443901bec8099ef6", size = 844775, upload-time = "2026-05-06T13:43:05.343Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/fd/7b/122376b1fd3c62c1ed9dc80c931ace4844b3c55407b6fb2d199377c9736f/pydantic-2.13.4-py3-none-any.whl", hash = "sha256:45a282cde31d808236fd7ea9d919b128653c8b38b393d1c4ab335c62924d9aba", size = 472262, upload-time = "2026-05-06T13:43:02.641Z" },
+]
+
+[[package]]
+name = "pydantic-core"
+version = "2.46.4"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+    { name = "typing-extensions" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/9d/56/921726b776ace8d8f5db44c4ef961006580d91dc52b803c489fafd1aa249/pydantic_core-2.46.4.tar.gz", hash = "sha256:62f875393d7f270851f20523dd2e29f082bcc82292d66db2b64ea71f64b6e1c1", size = 471464, upload-time = "2026-05-06T13:37:06.98Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/ce/8c/af022f0af448d7747c5154288d46b5f2bc5f17366eaa0e23e9aa04d59f3b/pydantic_core-2.46.4-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:3245406455a5d98187ec35530fd772b1d799b26667980872c8d4614991e2c4a2", size = 2106158, upload-time = "2026-05-06T13:38:57.215Z" },
+    { url = "https://files.pythonhosted.org/packages/19/95/6195171e385007300f0f5574592e467c568becce2d937a0b6804f218bc49/pydantic_core-2.46.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:962ccbab7b642487b1d8b7df90ef677e03134cf1fd8880bf698649b22a69371f", size = 1951724, upload-time = "2026-05-06T13:37:02.697Z" },
+    { url = "https://files.pythonhosted.org/packages/8e/bc/f47d1ff9cbb1620e1b5b697eef06010035735f07820180e74178226b27b3/pydantic_core-2.46.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8233f2947cf85404441fd7e0085f53b10c93e0ee78611099b5c7237e36aacbf7", size = 1975742, upload-time = "2026-05-06T13:37:09.448Z" },
+    { url = "https://files.pythonhosted.org/packages/5b/11/9b9a5b0306345664a2da6410877af6e8082481b5884b3ddd78d47c6013ce/pydantic_core-2.46.4-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3a233125ac121aa3ffba9a2b59edfc4a985a76092dc8279586ab4b71390875e7", size = 2052418, upload-time = "2026-05-06T13:37:38.234Z" },
+    { url = "https://files.pythonhosted.org/packages/f1/b7/a65fec226f5d78fc39f4a13c4cc0c768c22b113438f60c14adc9d2865038/pydantic_core-2.46.4-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5b712b53160b79a5850310b912a5ef8e57e56947c8ad690c227f5c9d7e561712", size = 2232274, upload-time = "2026-05-06T13:38:27.753Z" },
+    { url = "https://files.pythonhosted.org/packages/68/f0/92039db98b907ef49269a8271f67db9cb78ae2fc68062ef7e4e77adb5f61/pydantic_core-2.46.4-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9401557acd873c3a7f3eb9383edef8ac4968f9510e340f4808d427e75667e7b4", size = 2309940, upload-time = "2026-05-06T13:38:05.353Z" },
+    { url = "https://files.pythonhosted.org/packages/5f/97/2aab507d3d00ca626e8e57c1eac6a79e4e5fbcc63eb99733ff55d1717f65/pydantic_core-2.46.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:926c9541b14b12b1681dca8a0b75feb510b06c6341b70a8e500c2fdcff837cce", size = 2094516, upload-time = "2026-05-06T13:39:10.577Z" },
+    { url = "https://files.pythonhosted.org/packages/22/37/a8aca44d40d737dde2bc05b3c6c07dff0de07ce6f82e9f3167aeaf4d5dea/pydantic_core-2.46.4-cp312-cp312-manylinux_2_31_riscv64.whl", hash = "sha256:56cb4851bcaf3d117eddcef4fe66afd750a50274b0da8e22be256d10e5611987", size = 2136854, upload-time = "2026-05-06T13:40:22.59Z" },
+    { url = "https://files.pythonhosted.org/packages/24/99/fcef1b79238c06a8cbec70819ac722ba76e02bc8ada9b0fd66eba40da01b/pydantic_core-2.46.4-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:c68fcd102d71ea85c5b2dfac3f4f8476eff42a9e078fd5faefff6d145063536b", size = 2180306, upload-time = "2026-05-06T13:40:10.666Z" },
+    { url = "https://files.pythonhosted.org/packages/ae/6c/fc44000918855b42779d007ae63b0532794739027b2f417321cddbc44f6a/pydantic_core-2.46.4-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:b2f69dec1725e79a012d920df1707de5caf7ed5e08f3be4435e25803efc47458", size = 2190044, upload-time = "2026-05-06T13:40:43.231Z" },
+    { url = "https://files.pythonhosted.org/packages/6b/65/d9cadc9f1920d7a127ad2edba16c1db7916e59719285cd6c94600b0080ba/pydantic_core-2.46.4-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:8d0820e8192167f80d88d64038e609c31452eeca865b4e1d9950a27a4609b00b", size = 2329133, upload-time = "2026-05-06T13:39:57.365Z" },
+    { url = "https://files.pythonhosted.org/packages/d0/cf/c873d91679f3a30bcf5e7ac280ce5573483e72295307685120d0d5ad3416/pydantic_core-2.46.4-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:fbdb89b3e1c94a30cc5edfce477c6e6a5dc4d8f84665b455c27582f211a1c72c", size = 2374464, upload-time = "2026-05-06T13:38:06.976Z" },
+    { url = "https://files.pythonhosted.org/packages/47/bd/6f2fc8188f31bf10590f1e98e7b306336161fac930a8c514cd7bd828c7dc/pydantic_core-2.46.4-cp312-cp312-win32.whl", hash = "sha256:9aa768456404a8bf48a4406685ac2bec8e72b62c69313734fa3b73cf33b3a894", size = 1974823, upload-time = "2026-05-06T13:40:47.985Z" },
+    { url = "https://files.pythonhosted.org/packages/40/8c/985c1d41ea1107c2534abd9870e4ed5c8e7669b5c308297835c001e7a1c4/pydantic_core-2.46.4-cp312-cp312-win_amd64.whl", hash = "sha256:e9c26f834c65f5752f3f06cb08cb86a913ceb7274d0db6e267808a708b46bc89", size = 2072919, upload-time = "2026-05-06T13:39:21.153Z" },
+    { url = "https://files.pythonhosted.org/packages/c4/ba/f463d006e0c47373ca7ec5e1a261c59dc01ef4d62b2657af925fb0deee3a/pydantic_core-2.46.4-cp312-cp312-win_arm64.whl", hash = "sha256:4fc73cb559bdb54b1134a706a2802a4cddd27a0633f5abb7e53056268751ac6a", size = 2027604, upload-time = "2026-05-06T13:39:03.753Z" },
+    { url = "https://files.pythonhosted.org/packages/51/a2/5d30b469c5267a17b39dec53208222f76a8d351dfac4af661888c5aee77d/pydantic_core-2.46.4-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:5d5902252db0d3cedf8d4a1bc68f70eeb430f7e4c7104c8c476753519b423008", size = 2106306, upload-time = "2026-05-06T13:37:48.029Z" },
+    { url = "https://files.pythonhosted.org/packages/c1/81/4fa520eaffa8bd7d1525e644cd6d39e7d60b1592bc5b516693c7340b50f1/pydantic_core-2.46.4-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:c94f0688e7b8d0a67abf40e57a7eaaecd17cc9586706a31b76c031f63df052b4", size = 1951906, upload-time = "2026-05-06T13:37:17.012Z" },
+    { url = "https://files.pythonhosted.org/packages/03/d5/fd02da45b659668b05923b17ba3a0100a0a3d5541e3bd8fcc4ecb711309e/pydantic_core-2.46.4-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f027324c56cd5406ca49c124b0db10e56c69064fec039acc571c29020cc87c76", size = 1976802, upload-time = "2026-05-06T13:37:35.113Z" },
+    { url = "https://files.pythonhosted.org/packages/21/f2/95727e1368be3d3ed485eaab7adbd7dda408f33f7a36e8b48e0144002b91/pydantic_core-2.46.4-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e739fee756ba1010f8bcccb534252e85a35fe45ae92c295a06059ce58b74ccd3", size = 2052446, upload-time = "2026-05-06T13:37:12.313Z" },
+    { url = "https://files.pythonhosted.org/packages/9c/86/5d99feea3f77c7234b8718075b23db11532773c1a0dbd9b9490215dc2eeb/pydantic_core-2.46.4-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9d56801be94b86a9da183e5f3766e6310752b99ff647e38b09a9500d88e46e76", size = 2232757, upload-time = "2026-05-06T13:39:01.149Z" },
+    { url = "https://files.pythonhosted.org/packages/d2/3a/508ac615935ef7588cf6d9e9b91309fdc2da751af865e02a9098de88258c/pydantic_core-2.46.4-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2412e734dcb48da14d4e4006b82b46b74f2518b8a26ee7e58c6844a6cd6d03c4", size = 2309275, upload-time = "2026-05-06T13:37:41.406Z" },
+    { url = "https://files.pythonhosted.org/packages/07/f8/41db9de19d7987d6b04715a02b3b40aea467000275d9d758ffaa31af7d50/pydantic_core-2.46.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9551187363ffc0de2a00b2e47c25aeaeb1020b69b668762966df15fc5659dd5a", size = 2094467, upload-time = "2026-05-06T13:39:18.847Z" },
+    { url = "https://files.pythonhosted.org/packages/2c/e2/f35033184cb11d0052daf4416e8e10a502ea2ac006fc4f459aee872727d1/pydantic_core-2.46.4-cp313-cp313-manylinux_2_31_riscv64.whl", hash = "sha256:0186750b482eefa11d7f435892b09c5c606193ef3375bcf94aa00ae6bfb66262", size = 2134417, upload-time = "2026-05-06T13:40:17.944Z" },
+    { url = "https://files.pythonhosted.org/packages/7e/7b/6ceeb1cc90e193862f444ebe373d8fdf613f0a82572dde03fb10734c6c71/pydantic_core-2.46.4-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:5855698a4856556d86e8e6cd8434bc3ac0314ee8e12089ae0e143f64c6256e4e", size = 2179782, upload-time = "2026-05-06T13:40:32.618Z" },
+    { url = "https://files.pythonhosted.org/packages/5a/f2/c8d7773ede6af08036423a00ae0ceffce266c3c52a096c435d68c896083f/pydantic_core-2.46.4-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:cbaf13819775b7f769bf4a1f066cb6df7a28d4480081a589828ef190226881cd", size = 2188782, upload-time = "2026-05-06T13:36:51.018Z" },
+    { url = "https://files.pythonhosted.org/packages/59/31/0c864784e31f09f05cdd87606f08923b9c9e7f6e51dd27f20f62f975ce9f/pydantic_core-2.46.4-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:633147d34cf4550417f12e2b1a0383973bdf5cdfde212cb09e9a581cf10820be", size = 2328334, upload-time = "2026-05-06T13:40:37.764Z" },
+    { url = "https://files.pythonhosted.org/packages/c2/eb/4f6c8a41efa30baa755590f4141abf3a8c370fab610915733e74134a7270/pydantic_core-2.46.4-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:82cf5301172168103724d49a1444d3378cb20cdee30b116a1bd6031236298a5d", size = 2372986, upload-time = "2026-05-06T13:39:34.152Z" },
+    { url = "https://files.pythonhosted.org/packages/5b/24/b375a480d53113860c299764bfe9f349a3dc9108b3adc0d7f0d786492ebf/pydantic_core-2.46.4-cp313-cp313-win32.whl", hash = "sha256:9fa8ae11da9e2b3126c6426f147e0fba88d96d65921799bb30c6abd1cb2c97fb", size = 1973693, upload-time = "2026-05-06T13:37:55.072Z" },
+    { url = "https://files.pythonhosted.org/packages/7e/e8/cff247591966f2d22ec8c003cd7587e27b7ba7b81ab2fb888e3ab75dc285/pydantic_core-2.46.4-cp313-cp313-win_amd64.whl", hash = "sha256:6b3ace8194b0e5204818c92802dcdca7fc6d88aabbb799d7c795540d9cd6d292", size = 2071819, upload-time = "2026-05-06T13:38:49.139Z" },
+    { url = "https://files.pythonhosted.org/packages/c6/1a/f4aee670d5670e9e148e0c82c7db98d780be566c6e6a97ee8035528ca0b3/pydantic_core-2.46.4-cp313-cp313-win_arm64.whl", hash = "sha256:184c081504d17f1c1066e430e117142b2c77d9448a97f7b65c6ac9fd9aee238d", size = 2027411, upload-time = "2026-05-06T13:40:45.796Z" },
+    { url = "https://files.pythonhosted.org/packages/8d/74/228a26ddad29c6672b805d9fd78e8d251cd04004fa7eed0e622096cd0250/pydantic_core-2.46.4-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:428e04521a40150c85216fc8b85e8d39fece235a9cf5e383761238c7fa9b96fb", size = 2102079, upload-time = "2026-05-06T13:38:41.019Z" },
+    { url = "https://files.pythonhosted.org/packages/ad/1f/8970b150a4b4365623ae00fc88603491f763c627311ae8031e3111356d6e/pydantic_core-2.46.4-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:23ace664830ee0bfe014a0c7bc248b1f7f25ed7ad103852c317624a1083af462", size = 1952179, upload-time = "2026-05-06T13:36:59.812Z" },
+    { url = "https://files.pythonhosted.org/packages/95/30/5211a831ae054928054b2f79731661087a2bc5c01e825c672b3a4a8f1b3e/pydantic_core-2.46.4-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ce5c1d2a8b27468f433ca974829c44060b8097eedc39933e3c206a90ee49c4a9", size = 1978926, upload-time = "2026-05-06T13:37:39.933Z" },
+    { url = "https://files.pythonhosted.org/packages/57/e9/689668733b1eb67adeef047db3c2e8788fcf65a7fd9c9e2b46b7744fe245/pydantic_core-2.46.4-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:7283d57845ecf5a163403eb0702dfc220cc4fbdd18919cb5ccea4f95ee1cdab4", size = 2046785, upload-time = "2026-05-06T13:38:01.995Z" },
+    { url = "https://files.pythonhosted.org/packages/60/d9/6715260422ff50a2109878fd24d948a6c3446bb2664f34ee78cd972b3acd/pydantic_core-2.46.4-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8daafc69c93ee8a0204506a3b6b30f586ef54028f52aeeeb5c4cfc5184fd5914", size = 2228733, upload-time = "2026-05-06T13:40:50.371Z" },
+    { url = "https://files.pythonhosted.org/packages/18/ae/fdb2f64316afca925640f8e70bb1a564b0ec2721c1389e25b8eb4bf9a299/pydantic_core-2.46.4-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cd2213145bcc2ba85884d0ac63d222fece9209678f77b9b4d76f054c561adb28", size = 2307534, upload-time = "2026-05-06T13:37:21.531Z" },
+    { url = "https://files.pythonhosted.org/packages/89/1d/8eff589b45bb8190a9d12c49cfad0f176a5cbd1534908a6b5125e2886239/pydantic_core-2.46.4-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7a5f930472650a82629163023e630d160863fce524c616f4e5186e5de9d9a49b", size = 2099732, upload-time = "2026-05-06T13:39:31.942Z" },
+    { url = "https://files.pythonhosted.org/packages/06/d5/ee5a3366637fee41dee51a1fc91562dcf12ddbc68fda34e6b253da2324bb/pydantic_core-2.46.4-cp314-cp314-manylinux_2_31_riscv64.whl", hash = "sha256:c1b3f518abeca3aa13c712fd202306e145abf59a18b094a6bafb2d2bbf59192c", size = 2129627, upload-time = "2026-05-06T13:37:25.033Z" },
+    { url = "https://files.pythonhosted.org/packages/94/33/2414be571d2c6a6c4d08be21f9292b6d3fdb08949a97b6dfe985017821db/pydantic_core-2.46.4-cp314-cp314-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:1a7dd0b3ee80d90150e3495a3a13ac34dbcbfd4f012996a6a1d8900e91b5c0fb", size = 2179141, upload-time = "2026-05-06T13:37:14.046Z" },
+    { url = "https://files.pythonhosted.org/packages/7b/79/7daa95be995be0eecc4cf75064cb33f9bbbfe3fe0158caf2f0d4a996a5c7/pydantic_core-2.46.4-cp314-cp314-musllinux_1_1_aarch64.whl", hash = "sha256:3fb702cd90b0446a3a1c5e470bfa0dd23c0233b676a9099ddcc964fa6ca13898", size = 2184325, upload-time = "2026-05-06T13:36:53.615Z" },
+    { url = "https://files.pythonhosted.org/packages/9f/cb/d0a382f5c0de8a222dc61c65348e0ce831b1f68e0a018450d31c2cace3a5/pydantic_core-2.46.4-cp314-cp314-musllinux_1_1_armv7l.whl", hash = "sha256:b8458003118a712e66286df6a707db01c52c0f52f7db8e4a38f0da1d3b94fc4e", size = 2323990, upload-time = "2026-05-06T13:40:29.971Z" },
+    { url = "https://files.pythonhosted.org/packages/05/db/d9ba624cc4a5aced1598e88c04fdbd8310c8a69b9d38b9a3d39ce3a61ed7/pydantic_core-2.46.4-cp314-cp314-musllinux_1_1_x86_64.whl", hash = "sha256:372429a130e469c9cd698925ce5fc50940b7a1336b0d82038e63d5bbc4edc519", size = 2369978, upload-time = "2026-05-06T13:37:23.027Z" },
+    { url = "https://files.pythonhosted.org/packages/f2/20/d15df15ba918c423461905802bfd2981c3af0bfa0e40d05e13edbfa48bc3/pydantic_core-2.46.4-cp314-cp314-win32.whl", hash = "sha256:85bb3611ff1802f3ee7fdd7dbff26b56f343fb432d57a4728fdd49b6ef35e2f4", size = 1966354, upload-time = "2026-05-06T13:38:03.499Z" },
+    { url = "https://files.pythonhosted.org/packages/fc/b6/6b8de4c0a7d7ab3004c439c80c5c1e0a3e8d78bbae19379b01960383d9e5/pydantic_core-2.46.4-cp314-cp314-win_amd64.whl", hash = "sha256:811ff8e9c313ab425368bcbb36e5c4ebd7108c2bbf4e4089cfbb0b01eff63fac", size = 2072238, upload-time = "2026-05-06T13:39:40.807Z" },
+    { url = "https://files.pythonhosted.org/packages/32/36/51eb763beec1f4cf59b1db243a7dcc39cbb41230f050a09b9d69faaf0a48/pydantic_core-2.46.4-cp314-cp314-win_arm64.whl", hash = "sha256:bfec22eab3c8cc2ceec0248aec886624116dc079afa027ecc8ad4a7e62010f8a", size = 2018251, upload-time = "2026-05-06T13:37:26.72Z" },
+    { url = "https://files.pythonhosted.org/packages/e8/91/855af51d625b23aa987116a19e231d2aaef9c4a415273ddc189b79a45fee/pydantic_core-2.46.4-cp314-cp314t-macosx_10_12_x86_64.whl", hash = "sha256:af8244b2bef6aaad6d92cda81372de7f8c8d36c9f0c3ea36e827c60e7d9467a0", size = 2099593, upload-time = "2026-05-06T13:39:47.682Z" },
+    { url = "https://files.pythonhosted.org/packages/fb/1b/8784a54c65edb5f49f0a14d6977cf1b209bba85a4c77445b255c2de58ab3/pydantic_core-2.46.4-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:5a4330cdbc57162e4b3aa303f588ba752257694c9c9be3e7ebb11b4aca659b5d", size = 1935226, upload-time = "2026-05-06T13:40:40.428Z" },
+    { url = "https://files.pythonhosted.org/packages/e8/e7/1955d28d1afc56dd4b3ad7cc0cf39df1b9852964cf16e5d13912756d6d6b/pydantic_core-2.46.4-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:29c61fc04a3d840155ff08e475a04809278972fe6aef51e2720554e96367e34b", size = 1974605, upload-time = "2026-05-06T13:37:32.029Z" },
+    { url = "https://files.pythonhosted.org/packages/93/e2/3fedbf0ba7a22850e6e9fd78117f1c0f10f950182344d8a6c535d468fdd8/pydantic_core-2.46.4-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c50f2528cf200c5eed56faf3f4e22fcd5f38c157a8b78576e6ba3168ec35f000", size = 2030777, upload-time = "2026-05-06T13:38:55.239Z" },
+    { url = "https://files.pythonhosted.org/packages/f8/61/46be275fcaaba0b4f5b9669dd852267ce1ff616592dccf7a7845588df091/pydantic_core-2.46.4-cp314-cp314t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0cbe8b01f948de4286c74cdd6c667aceb38f5c1e26f0693b3983d9d74887c65e", size = 2236641, upload-time = "2026-05-06T13:37:08.096Z" },
+    { url = "https://files.pythonhosted.org/packages/60/db/12e93e46a8bac9988be3c016860f83293daea8c716c029c9ace279036f2f/pydantic_core-2.46.4-cp314-cp314t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:617d7e2ca7dcb8c5cf6bcb8c59b8832c94b36196bbf1cbd1bfb56ed341905edd", size = 2286404, upload-time = "2026-05-06T13:40:20.221Z" },
+    { url = "https://files.pythonhosted.org/packages/e2/4a/4d8b19008f38d31c53b8219cfedc2e3d5de5fe99d90076b7e767de29274f/pydantic_core-2.46.4-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7027560ee92211647d0d34e3f7cd6f50da56399d26a9c8ad0da286d3869a53f3", size = 2109219, upload-time = "2026-05-06T13:38:12.153Z" },
+    { url = "https://files.pythonhosted.org/packages/88/70/3cbc40978fefb7bb09c6708d40d4ad1a5d70fd7213c3d17f971de868ec1f/pydantic_core-2.46.4-cp314-cp314t-manylinux_2_31_riscv64.whl", hash = "sha256:f99626688942fb746e545232e7726926f3be91b5975f8b55327665fafda991c7", size = 2110594, upload-time = "2026-05-06T13:40:02.971Z" },
+    { url = "https://files.pythonhosted.org/packages/9d/20/b8d36736216e29491125531685b2f9e61aa5b4b2599893f8268551da3338/pydantic_core-2.46.4-cp314-cp314t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:fc3e9034a63de20e15e8ade85358bc6efc614008cab72898b4b4952bea0509ff", size = 2159542, upload-time = "2026-05-06T13:39:27.506Z" },
+    { url = "https://files.pythonhosted.org/packages/1d/a2/367df868eb584dacf6bf82a389272406d7178e301c4ac82545ab98bc2dd9/pydantic_core-2.46.4-cp314-cp314t-musllinux_1_1_aarch64.whl", hash = "sha256:97e7cf2be5c77b7d1a9713a05605d49460d02c6078d38d8bef3cbe323c548424", size = 2168146, upload-time = "2026-05-06T13:38:31.93Z" },
+    { url = "https://files.pythonhosted.org/packages/c1/b8/4460f77f7e201893f649a29ab355dddd3beee8a97bcb1a320db414f9a06e/pydantic_core-2.46.4-cp314-cp314t-musllinux_1_1_armv7l.whl", hash = "sha256:3bf92c5d0e00fefaab325a4d27828fe6b6e2a21848686b5b60d2d9eeb09d76c6", size = 2306309, upload-time = "2026-05-06T13:37:44.717Z" },
+    { url = "https://files.pythonhosted.org/packages/64/c4/be2639293acd87dc8ddbcec41a73cee9b2ebf996fe6d892a1a74e88ad3f7/pydantic_core-2.46.4-cp314-cp314t-musllinux_1_1_x86_64.whl", hash = "sha256:3ecbc122d18468d06ca279dc26a8c2e2d5acb10943bb35e36ae92096dc3b5565", size = 2369736, upload-time = "2026-05-06T13:37:05.645Z" },
+    { url = "https://files.pythonhosted.org/packages/30/a6/9f9f380dbb301f67023bf8f707aaa75daadf84f7152d95c410fd7e81d994/pydantic_core-2.46.4-cp314-cp314t-win32.whl", hash = "sha256:e846ae7835bf0703ae43f534ab79a867146dadd59dc9ca5c8b53d5c8f7c9ef02", size = 1955575, upload-time = "2026-05-06T13:38:51.116Z" },
+    { url = "https://files.pythonhosted.org/packages/40/1f/f1eb9eb350e795d1af8586289746f5c5677d16043040d63710e22abc43c9/pydantic_core-2.46.4-cp314-cp314t-win_amd64.whl", hash = "sha256:2108ba5c1c1eca18030634489dc544844144ee36357f2f9f780b93e7ddbb44b5", size = 2051624, upload-time = "2026-05-06T13:38:21.672Z" },
+    { url = "https://files.pythonhosted.org/packages/f6/d2/42dd53d0a85c27606f316d3aa5d2869c4e8470a5ed6dec30e4a1abe19192/pydantic_core-2.46.4-cp314-cp314t-win_arm64.whl", hash = "sha256:4fcbe087dbc2068af7eda3aa87634eba216dbda64d1ae73c8684b621d33f6596", size = 2017325, upload-time = "2026-05-06T13:40:52.723Z" },
+    { url = "https://files.pythonhosted.org/packages/9d/1d/8987ad40f65ae1432753072f214fb5c74fe47ffbd0698bb9cbbb585664f8/pydantic_core-2.46.4-graalpy312-graalpy250_312_native-macosx_10_12_x86_64.whl", hash = "sha256:1d8ba486450b14f3b1d63bc521d410ec7565e52f887b9fb671791886436a42f7", size = 2095527, upload-time = "2026-05-06T13:39:52.283Z" },
+    { url = "https://files.pythonhosted.org/packages/64/d3/84c282a7eee1d3ac4c0377546ef5a1ea436ce26840d9ac3b7ed54a377507/pydantic_core-2.46.4-graalpy312-graalpy250_312_native-macosx_11_0_arm64.whl", hash = "sha256:3009f12e4e90b7f88b4f9adb1b0c4a3d58fe7820f3238c190047209d148026df", size = 1936024, upload-time = "2026-05-06T13:40:15.671Z" },
+    { url = "https://files.pythonhosted.org/packages/d7/ca/eac61596cdeb4d7e174d3dc0bd8a6238f14f75f97a24e7b7db4c7e7340a0/pydantic_core-2.46.4-graalpy312-graalpy250_312_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ad785e92e6dc634c21555edc8bd6b64957ab844541bcb96a1366c202951ae526", size = 1990696, upload-time = "2026-05-06T13:38:34.717Z" },
+    { url = "https://files.pythonhosted.org/packages/fa/c3/7c8b240552251faf6b3a957db200fcfbbcec36763c050428b601e0c9b83b/pydantic_core-2.46.4-graalpy312-graalpy250_312_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:00c603d540afdd6b80eb39f078f33ebd46211f02f33e34a32d9f053bba711de0", size = 2147590, upload-time = "2026-05-06T13:39:29.883Z" },
+]
+
+[[package]]
+name = "pymodbus"
+version = "3.13.1"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/c2/e4/68aa328d8c07583b1fe382f231d614bc1ebf3a86aa09db1a9c045c33c1df/pymodbus-3.13.1.tar.gz", hash = "sha256:7a74ea0a4eb4895f518b34de32915ba4fde216576e09deaf735a279a9281af4f", size = 166178, upload-time = "2026-06-13T17:02:09.885Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/df/84/cdd3f6af834dac9e3bfaeca1f37c4dbfd305943305670c48499950e4e1cd/pymodbus-3.13.1-py3-none-any.whl", hash = "sha256:820167a9c6a13d698d7ff49e8420f8fbbdd8fec3f75aacd46a35f4ab9a000144", size = 166529, upload-time = "2026-06-13T17:02:08.374Z" },
+]
+
+[[package]]
+name = "starlette"
+version = "1.3.1"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+    { name = "anyio" },
+    { name = "typing-extensions", marker = "python_full_version < '3.13'" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/eb/e3/7c1dc7381d9f8ab7d854328ebfa884e62cb3f3d8549ddfd37c7814f42afa/starlette-1.3.1.tar.gz", hash = "sha256:05d0213193f2fbaae60e2ecb593b4add4262ad4e46536b54abe36f11a71724e0", size = 2703240, upload-time = "2026-06-12T09:23:11.602Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/ec/bb/2799cc2ede3ed41131f8975621e7213dfc7ef4acbbaadfa440f32500c370/starlette-1.3.1-py3-none-any.whl", hash = "sha256:c7372aae11c3c3f26a42df7bd626cec2f47d03483d261d369516a615a53714c6", size = 73632, upload-time = "2026-06-12T09:23:10.017Z" },
+]
+
+[[package]]
+name = "typing-extensions"
+version = "4.15.0"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz", hash = "sha256:0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466", size = 109391, upload-time = "2025-08-25T13:49:26.313Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/18/67/36e9267722cc04a6b9f15c7f3441c2363321a3ea07da7ae0c0707beb2a9c/typing_extensions-4.15.0-py3-none-any.whl", hash = "sha256:f0fa19c6845758ab08074a0cfa8b7aecb71c999ca73d62883bc25cc018c4e548", size = 44614, upload-time = "2025-08-25T13:49:24.86Z" },
+]
+
+[[package]]
+name = "typing-inspection"
+version = "0.4.2"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+    { name = "typing-extensions" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz", hash = "sha256:ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464", size = 75949, upload-time = "2025-10-01T02:14:41.687Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/dc/9b/47798a6c91d8bdb567fe2698fe81e0c6b7cb7ef4d13da4114b41d239f65d/typing_inspection-0.4.2-py3-none-any.whl", hash = "sha256:4ed1cacbdc298c220f1bd249ed5287caa16f34d44ef4e9c3d0cbad5b521545e7", size = 14611, upload-time = "2025-10-01T02:14:40.154Z" },
+]
+
+[[package]]
+name = "uvicorn"
+version = "0.49.0"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+    { name = "click" },
+    { name = "h11" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/c4/1f/fa18009dea8469069cca78a4e877a008ab78f08b064bfc9ab891579077ff/uvicorn-0.49.0.tar.gz", hash = "sha256:ebf4271aa580d9de97f93192d4595176df6e91f9aae919ca73e4fc07df1e66a3", size = 91284, upload-time = "2026-06-03T22:01:30.448Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/88/fa/e1388bbcf24ef3274f45c0c1c7b501fd14971037c1b6ee23610553307497/uvicorn-0.49.0-py3-none-any.whl", hash = "sha256:ba3d14c3ee7e41c6c654c46c9eb489d33213cdd30aa1696eab1374337c13f68f", size = 71376, upload-time = "2026-06-03T22:01:29.037Z" },
+]