Fork me on GitHub

The Web Framework that scales with you.

TurboGears 2 is built on top of the experience of several next generation web frameworks including TurboGears 1 (of course), Django, and Rails. All of these frameworks had limitations that frustrated us, and TG2 was built as an answer to that frustration:

Follow TurboGears on Google+ for the latest news!

Give It a Try

TurboGears 2 works on Python 2.6, 2.7, 3.2, 3.3 and 3.4.
Try it now, in your browser, using Runnable

Or set it up on your machine:

$ virtualenv --no-site-packages tg2env
$ cd tg2env/
$ source bin/activate
(tg2env)$ pip install tg.devtools

Start a single file Hello World

from wsgiref.simple_server import make_server
from tg import expose, TGController, AppConfig

class RootController(TGController):
     @expose()
     def index(self):
         return "<h1>Hello World</h1>"

config = AppConfig(minimal=True, root_controller=RootController())

print "Serving on port 8080..."
httpd = make_server('', 8080, config.make_wsgi_app())
httpd.serve_forever()

Or with a Full Stack project:

(tg2env)$ gearbox quickstart example
(tg2env)$ cd example/
(tg2env)$ python setup.py develop
(tg2env)$ gearbox serve

Get started Learning TurboGears 2 by looking at Documentation and our famous wiki tutorial.