The API of zeep changes according to the version of zeep. We want to limit the number of used methods and attributes of the zeep client by our developers. Hence, we provide our own zeep Client limited to the attribute and method we really need. In addition, a timeout for GET/POST requests should be applied by default when creating a new Client, which is not the case by default. We override that behavior to always provide a default timeout, and an easier API for developers wanting to change the default timeout. Before it was needed to import `Transport` from `zeep`, instanciate that `Transport`, with a timeout and optionally a session, and then pass that transport instance to the creation of the Client. We provide a way to directly pass these timeout parameters through the Client constructor. In addition, we serialize the returned values of Zeep service operation calls, to make sure we return simple types in methods of models e.g. bools, integers, string, ...
2 lines
24 B
Python
2 lines
24 B
Python
from zeep.wsse import *
|