1

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!

mr ng
  • 293
  • 1
  • 3
  • 12
  • 1
    If you only have a single script you can run it directly as a CGI script on the server (see [here](http://docs.python.org/2/howto/webservers.html) and [here](http://stackoverflow.com/questions/15878010/run-python-script-as-cgi-apache-server)), no need for a framework. And in your example it looks like you're assuming that AJAX is a framework; it's not. –  Feb 11 '14 at 14:47

2 Answers2

2

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

Andrii Rusanov
  • 4,405
  • 2
  • 34
  • 54
0

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

Julien Greard
  • 969
  • 1
  • 12
  • 32