Skip to content

Commit 4435244

Browse files
committed
missing dataclass import
1 parent 59565a8 commit 4435244

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

xpwebapi/ws.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import json
99
import time
1010

11+
from dataclasses import dataclass
1112
from datetime import datetime
1213
from typing import Tuple, Dict
1314
from enum import Enum
@@ -50,6 +51,16 @@ class CALLBACK_TYPE(Enum):
5051
AFTER_START = "after_start"
5152
BEFORE_STOP = "before_stop"
5253

54+
@dataclass
55+
class Request:
56+
"""Pythonic dataclass to host X-Plane Beacon data."""
57+
58+
r_id: int # Request id
59+
body: dict # Request body
60+
success: bool | None # sucess of request, None if no feedback yet
61+
error: str | None # error message, if any
62+
63+
5364

5465
# #############################################
5566
# WEBSOCKET API

0 commit comments

Comments
 (0)