0

I 'm using the suds library to consume a SOAP Api service. The data receiving is a suds object. I need convert from suds object to python dict.

According the documentation the way to do this is

from suds.client import Client

# Code to obtain your suds_object here...

required_dict = Client.dict(suds_object)

But not work. The console show me this:

{'root': <suds.sudsobject.root object at 0x7fafdf98c700>}

If i add a print with type the result is a dict but in fact i don't get a dict

data...
HedgeHog
  • 22,146
  • 4
  • 14
  • 36
  • [The same question](https://stackoverflow.com/questions/17581731/parsing-suds-soap-complex-data-type-into-python-dict/30066165) Did you try all there? – 4d61726b Dec 26 '20 at 14:14
  • [Another question](https://stackoverflow.com/questions/2412486/serializing-a-suds-object-in-python) – 4d61726b Dec 26 '20 at 14:17

1 Answers1

0

Try the function at the very end of this link: Serializing a suds object in python

Addresses both recursive suds objects, but also suds.sax.text.Text

Charlie Heitzig
  • 111
  • 1
  • 5