0

How to insert the received message from android to python in mySQL?

In other words I'm opening socket between android and python and anything I enter in android it send to my python then I want this thing whatever string or it to be insert to python !!

I know about the insert method and it works fine with me but I want to do this method using the received message. Any help?

Brock Adams
  • 90,639
  • 22
  • 233
  • 295
roro
  • 1

1 Answers1

1

What you might want to consider is setting up a Python-based Web service. Call the Web service from Android and have the Web service do your database INSERTs for you.

Be sure to implement sufficient measures in your Web service to ensure that not-just-any query is allowed to be performed simply by passing it into your Web service. Implement a query sanitizer, or similar. SQLAlchemy is a fairly heavy-weight ORM framework (implemented in Python), but it does have its own query sanitizer.

Community
  • 1
  • 1
AJ.
  • 27,586
  • 18
  • 84
  • 94