Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
devwiki:python [2024/03/21 08:53] – [Online Python run] ying | devwiki:python [2024/03/25 06:36] (current) – [Python and interaction with other API] ying | ||
---|---|---|---|
Line 2415: | Line 2415: | ||
# chat (first_name, | # chat (first_name, | ||
</ | </ | ||
+ | |||
+ | ====== Python and Networking related ====== | ||
+ | |||
+ | * above is python interact with a REST API server, you can also use python to build your own REST API server to handle requests from other application, | ||
+ | * implement REST API into python, you may need to use some python module like Flash, FastAPI, then you start another thread from your python application to run your REST API server. | ||
+ | * while using Sockets method may be simpler if you just want to send some simple message between applications, | ||
+ | * using REST API allow your application to talk cross different application and difference device, and provide a safe gate to your important data handled by your application. | ||