简体   繁体   中英

Python backend and html/ajax front end, need suggestions for my application

Currently I have written a python script that extracts data from flickr site, and dump as a python class object and YAML file.

I was planning to turn this into a website:

  • and a simple html front page that can send a request to the backend, triggers the python scripts running on the backend

  • the response will be parsed and render as a table on the html page.

As i am very new to python, I am not sure how to plan my project. is there any suggestions for building this application? any framework or technologies i should use? For example, i guess i should use ajax in the front end, how about the backend?

Thanks in advance for your suggestions!

You can look on Django or Flask. As for me, Flask is much better for you, because it smallest and simplier. You can read about building Flask app here: http://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world And about Django here: http://www.djangobook.com/en/2.0/index.html I used both for building applications with AJAX.

Please note that Django has better Python 3 support.

Also you can see on Bottle or something other. Try google if you'll dislike Django and Flask. For example, comparison of Python web frameworks: http://www.sixfeetup.com/blog/4-python-web-frameworks-compared

you should use Django framework for your app. You can integrate your scripts into Django views. And you can also use the loaddata system in order to insert your yaml data into the database

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM