trying to figure out best project structure
This commit is contained in:
22
src/alpine_bits_python/util/handshake_util.py
Normal file
22
src/alpine_bits_python/util/handshake_util.py
Normal file
@@ -0,0 +1,22 @@
|
||||
from generated.alpinebits import OtaPingRq, OtaPingRs
|
||||
|
||||
|
||||
|
||||
|
||||
def main():
|
||||
# test parsing a ping request sample
|
||||
|
||||
path = "../../AlpineBits-HotelData-2024-10/files/samples/Handshake/Handshake-OTA_PingRQ.xml"
|
||||
|
||||
with open(
|
||||
path, "r", encoding="utf-8") as f:
|
||||
xml = f.read()
|
||||
|
||||
# Parse the XML into the request object
|
||||
request = OtaPingRq.from_xml(xml)
|
||||
print("Parsed OTA_PingRQ:", request)
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
|
||||
main()
|
||||
Reference in New Issue
Block a user