views:

303

answers:

8

Django installation itself was quite a task (for a beginner like me) and reading a book to learn it would not be possible right now. I'm just looking to create simple test applications only to learn Python better, so I'm not ready for Django yet.

Is there any simple web framework that can be used for test projects, so I don't have to spend most of the time in project setup and configuration?

+2  A: 

Try web.py or Python's cgi.

Jeff
+2  A: 

I've used Django. Project setup and configuration shouldn't take that long compared to writing the project code. I think it would probably be fastest to use Django. The next-best alternative would be to use SimpleHTTPServer, which is in the Python library. You have to do a lot of work yourself, such as generating 404s and response headers, and you have to manage database connections yourself, but it is simpler.

Dietrich Epp
Simple HTTPServer is really simple to use, if you want just very simple HTTP responses.
Khelben
+4  A: 

Pylons is pretty easy to set up - there's a command that generates the skeleton code for your application and you can write your code with no configuration other than the port number you want it to listen on.

Evgeny
I use pylons heavily. I would say, pylons need steep learning curve and you must be sold to use pylons because of its openness. But for simple hello world style application, using the web framework as just a framework, pylons plays very well.
Gopalakrishnan Subramani
+4  A: 

cherrypy is another more lightweight solution. It's just the web server part of the equation, and lets you handle templating/database (if any) as you prefer.

Here's the minimal application, from the tutorial:

import cherrypy

class HelloWorld:
    def index(self):
        return "Hello world!"
    index.exposed = True

cherrypy.quickstart(HelloWorld())
Ryan Ginstrom
+3  A: 

I started with web2py and found it both easy and powerful.

Michał Niklas
+2  A: 

I would definitely recommend werkzeug. It is really dead simple and will expose you to WSGI which is also used by several framework like django and Google App Engine.

jpartogi
+2  A: 

you could also try google app engines webapp framework if you want something to create toy webapps that deploy really easily (and cheaply !)

markng
+1  A: 

I think you don't need to read a complete book on django. It's also very common to start with the excellent django tutorial. After that you can play a bit with your code and still have one of the greatest documentions that is available for any opensource framework at your hand.

I learned django only through the docs at the time I was starting. It is very understandable and does not require a deep understanding of python.

Gregor Müllegger