Are there libraries supporting MTOM encryption in Python

I am using Python Suds to connect to a web service, and I want to use MTOM-encrpytion to send an XML message. I browsed the web and saw libraries for PHP, etc., but not for Python. Can anyone recommend a good MTOM library for use, preferably for use with SUDS.

Thanks for any suggestions.

+3
source share
1 answer

It depends on whether you are talking about encryption or MTOM encoding. If you are talking about encryption, then most likely you are looking for a WS Security solution. In this case, PyXMLSec is a good option for encrypting and digitally signing XML. However, I would caution against using XML encryption, as it was broken. Instead, you can use GPG encryption or something similar.

If you are talking about MTOM encoding, then I do not believe that there is a ready-made solution to do what you ask, but it should not be so difficult. MTOM uses MIME attachments to send binary data. You should be able to use Python built into the mail.mime package to create MIME messages.

0
source

Source: https://habr.com/ru/post/1750462/


All Articles