Web service in Python

Y

yiitest123

I installed rapidsms in local for send messages. The application tested with local server. Now i would like to store the incoming messages in another database via a php application. Means when a message received in rapidsms (Django-Python) app, i want to call a php application function and store message in php app database. For this which method is best?

Thanks
 
D

dieter

I installed rapidsms in local for send messages. The application tested with local server. Now i would like to store the incoming messages in another database via a php application. Means when a message received in rapidsms (Django-Python) app, i want to call a php application function and store message in php app database. For this which method is best?

As you describe your wishes (the description could be a bit more precise),
the web service would not be in Python but in PHP.

When your PHP application would provide a SOAP/WSDL webservice,
then you could use a Python webservice client, e.g. "suds",
to interface with such a webservice.
When your PHP application would provide a REST webservice,
other Python libraries ("urllib", "json", ...) could be used.
Details much depend on the kind of webservice provided by the PHP
application.

In typical case, I find the approach a bit convoluted. In those cases,
the Python application would directly store the messages in the
database - not send them to a second web service for storing.
But, there are cases where the approach may make sense - e.g.
when there is already such a second web service (which just needs to
be used).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,150
Members
46,697
Latest member
AugustNabo

Latest Threads

Top