-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstructs.py
More file actions
99 lines (80 loc) · 1.54 KB
/
structs.py
File metadata and controls
99 lines (80 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
'''
structs for msgspec
'''
from typing import Dict, List, Optional
from msgspec import Struct
class Query(Struct):
"""
Struct for Query
"""
date: str
depAirport: str
arrAirport: str
class Request(Struct):
"""
Struct for Request
"""
supplier: str
tripType: str
fareClass: str
adultAmount: int
childAmount: int
infantAmount: int
queries: List[Query]
timestamp: int
class Segment(Struct):
"""
Struct for Segment
"""
fareClass: str
depDate: str
depTime: str
flightNo: str
carrier: str
orgAirport: str
arriveDate: str
arriveTime: str
dstAirport: str
class Flight(Struct):
"""
Struct for Flight
"""
segments: List[Segment]
class Price(Struct):
"""
Struct for Price
"""
price: float
tax: float
totalPrice: float
seatsStatus: Optional[str] = None
currencyCode: Optional[str] = None
class Trip(Struct):
"""
Struct for Trip
"""
flights: List[Flight]
extended = Dict[str, str]
prices: Optional[Dict[str, Price]] = None
class PreparedData(Struct):
"""
Struct of PreparedData
"""
request_rt: Request
trip_rt: Trip
request_ow_dep: Request
prices_ow_dep: Dict[str, Price]
request_ow_ret: Request
prices_ow_ret: Dict[str, Price]
key: Optional[str] = None
class Result(Struct):
"""
Struct of Result
"""
trips: List[Trip]
class CacheInfo(Struct):
"""
Struct of CacheInfo
"""
request: Request
result: Result