Python does background processing of front-end ajax requests instead of flask and django

problem description

python processes the front-end request and sends back a json data

the environmental background of the problems and what methods you have tried

the shit I need to do, the backend implements a crawler with python, and gets two pieces of data
returns {"a": a, "b", b}

by json.

now that I want to get this data in the background, I just want to ask how to use ajax to implement
Let python send back this json data in the background

related codes

what result do you expect? What is the error message actually seen?

Jan.25,2022

1. It is impossible to build your own service. You can use flask and django
2. If you do not want to introduce a large framework, you can write your own socket server and describe it with socketserver module link

.
Menu