如何将python / django项目与仅为php提供api的web服务集成?

I work on a django website. Currently, I need to integrate it with a third-party API that provides only PHP endpoints and some shitty documentation that instructs how to build PHP requests. The API provider introduces a PHP client containing a class that handles requests to PHP API webservice via SOAP.

First, is it possible to build python client that will interact with PHP endpoints without knowing server-side trickery of the API provider? Should I dive deeper into PHP client source code and try to rewrite it in python?

Second, should I create intermediary PHP webservice that will integrate third-party PHP API and provide a precise API to interact with python client.

Is there any better option?

P.S. Please, note that I'm new to PHP and SOAP.

Just like any other API. You just have to use the PHP client as a guide to build the API client in python. If you feel it's no help at all, throw it away and look what the endpoints are and what they spit out.

In the end, the endpoints on the remote server can be programmed in Smalltalk for you care. The API client only cares about what parameters to send to the server and what the response looks like.

So pick your basics:

and start coding ;) Good luck!