简体   繁体   English

Zeep 与 Python 中 SOAP API 的请求对比

[英]Zeep vs Requests for SOAP APIs in Python

So I know that Python's requests module can be used to handle REST APIs, and as per this answer here , requests can also handle SOAP APIs as well.所以我知道 Python 的requests模块可以用来处理 REST API,根据这里的答案, requests也可以处理 SOAP API。 I've worked only with REST APIs so far, but of the few people I know who work with SOAP APIs, they almost always use another module zeep .到目前为止,我只使用过 REST API,但在我认识的少数使用 SOAP API 的人中,他们几乎总是使用另一个模块zeep

Is there anything I'm missing?有什么我想念的吗? Why is there a need for a whole seperate module, when it is possible using requests as well - and more importantly, why doesn't anybody just uses requests instead of using zeep ?为什么需要一个完整的单独模块,当它也可以使用requests时 - 更重要的是,为什么没有人只使用requests而不是使用zeep

Ease of use and reusability.易于使用和可重复使用。 While you could use the requests module and write raw XML, Zeep is a high level interface which generates the XML automatically虽然您可以使用 requests 模块并编写原始 XML,但 Zeep 是一个高级接口,它会自动生成 XML

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM