Giter VIP home page Giter VIP logo

tg2's Introduction

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

NOTE: This is development branch, for current stable release refer to Documentation

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.

tg2's People

Contributors

amol- avatar castixgithub avatar chbrown avatar cito avatar clsdaniel avatar deets avatar ebenmoha avatar elpargo avatar eteamin avatar faide avatar federicofiori avatar lambacck avatar lmacken avatar marcelotduarte avatar markramm avatar mcfletch avatar nphilipp avatar patrickdepinguin avatar pedersen avatar percious avatar ralphbean avatar rick446 avatar schneems avatar smarzola avatar sobolevn avatar turbo87 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.