Building a kind of ETL Extract Transform & Load small tool, i am facing this:
#1 I would like to convert zeep output data into a dict to store/manipulate it more easily.
But, zeep output data are of “dynamically constructed” <class ‘zeep.objects.*’> , built
according the soap wsdl/xsd thing .
Is there a neat way to make the convert ? (i have a ugly way using str, then eval but … it is ugly) .
#2 by the way, is there a easy way to test that zeep output data is from a class from family
zeep.objects ; using this can ease solution of question #1 using a recursive function ?
( here also an ugly thing exists …)
Many thanks . Didier
as you see data are nested and extracted from aviation domain … )
‘structuredFlightPlan’: {
‘flightPlan’: {
‘ifplId’: ‘AT9999999’,
‘airFiledData’: None,
‘aerodromeOfDeparture’: {
‘icaoId’: ‘EGGW’,
‘otherDesignation’: None
},
‘aerodromesOfDestination’: {
‘aerodromeOfDestination’: {
‘icaoId’: ‘LFPB’,
‘otherDesignation’: None
},
‘alternate1’: {
‘icaoId’: ‘EBBR’,
‘nameLocationDescription’: None
},
‘alternate2’: None
},
‘enrouteAlternateAerodromes’: ‘EGGW LFPB’,
‘takeOffAlternateAerodromes’: None,
‘aircraftId’: {
‘aircraftId’: ‘VVVVV’,
‘registrationMark’: ‘VVVVV’,
‘aircraftAddress’: ‘999999’,
‘ssrInfo’: None
},
‘whatIfRerouteReference’: None,
‘numberOfAircraft’: None,
‘aircraftType’: {
‘icaoId’: ‘GL7T’,
‘otherDesignation’: None
},
coz787 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.