Skip to content
Python web framework with full-stack layer implemented on top of a microframework core with support for MongoDB, Pluggable Applications and autogenerated Admin
Python HTML Makefile
Branch: development
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs Make easier to create single file TG applications Jul 8, 2012
tests expect backlash to log errors May 6, 2020
tg Version 2.4.3 Mar 1, 2020
.coveragerc Show missing lines in coverage report May 8, 2019
.gitignore Minor setup cleanups. Removing older mercurial references. Sep 24, 2012
.travis.yml Switch coverage reporting to Py3.7 Feb 6, 2020
CHANGES.txt Version 2.4.3 Mar 1, 2020
CONTRIBUTING.txt Update contributing URL Jun 22, 2015
LICENSE.txt Adding LICENSE.txt file that was missed. Dec 16, 2009
README.rst Version 2.4.3 Mar 1, 2020
setup.cfg Tweak default logging level during tests Feb 23, 2019
setup.py Compatible with backlash 0.3.0 May 6, 2020

README.rst

TurboGears

https://travis-ci.org/TurboGears/tg2.svg?branch=development https://coveralls.io/repos/TurboGears/tg2/badge.svg?branch=development https://img.shields.io/twitter/follow/turbogearsorg.svg?style=social&label=Follow

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.

Get Started

https://asciinema.org/a/181221.png

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 webapp.py file with your application:

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

# RootController of our web app, in charge of serving content for /
class RootController(TGController):
    @expose(content_type="text/plain")
    def index(self):
        return 'Hello World'

# Configure a new minimal application with our root controller.
config = MinimalApplicationConfigurator()
config.update_blueprint({
    'root_controller': RootController()
})

# Serve the newly configured web application.
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 http://localhost:8080/

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.

License

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.

You can’t perform that action at this time.