TurboGears is a hybrid web framework able to act both as a Full Stack framework or as a Microframework. TurboGears helps you get going fast and gets out of your way when you want it!
TurboGears can be used both as a full stack framework or as a microframework in single file mode.
NOTE: This is development branch, for current stable release refer to Documentation
To try TurboGears just get
pip if you don't already have it:
$ curl -O 'https://bootstrap.pypa.io/get-pip.py' $ python get-pip.py
And install Turbogears:
$ pip install TurboGears2
Then serving a TurboGears web application is as simple as making a
file with you application:
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()
Start it with
python webapp.py and open your browser at
Want to play further with TurboGears? Try the TurboGears Tutorials:
Support and Documentation
Visit TurboGears Documentation for complete documentation and tutorials.
See the TurboGears website to get a quick overview of the framework and look for support.
TurboGears is licensed under an MIT-style license (see LICENSE.txt). Other incorporated projects may be licensed under different licenses. All licenses allow for non-commercial and commercial use.