Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create simple web site with Python? [closed]

Tags:

How to create simple web site with Python?

I mean really simple, f.ex, you see text "Hello World", and there are button "submit", which onClick will show AJAX box "submit successful".

I want to start develop some stuff with Python, and I don't know where to start.

like image 545
Lukas Šalkauskas Avatar asked Apr 21 '10 09:04

Lukas Šalkauskas


People also ask

Can I build a website with only Python?

Two of the most popular frameworks to build websites with Python are Flask and Django. Django is a high-level Python web framework that enables the developer to create websites without third-party libraries and tools. In contrast, Flask is a microframework that offers the basic features of a web app.


1 Answers

I was hoping more elaborate answers would be given to this question, since it's a sensitive subject. Python web developing is split across lots of frameworks, each with its ups and downs and every developer using a different one. This is quite unfortunate. What you should know:

  • Use WSGI. Don't use anything else, WSGI is the latest standard in Python web developing;
  • Don't develop directly on top of WSGI, unless you really have to (not even for a hello world app);
  • Use a framework that best suits your needs:
    • I played with Werkzeug (which is not really a platform, they call it a toolkit) because it's really simple yet powerful. It lets you work on the WSGI level (also helps you understand how WSGI works) while providing really useful features and helpers. On the Werkzeug website you will also find useful tutorials and things like that.
    • Probably the most popular framework is Django. Never used it, but maybe there's a reason for why it is so popular.

In conclusion, use whatever is closest to your heart.

like image 166
Felix Avatar answered Oct 20 '22 00:10

Felix