GithubHelp home page GithubHelp logo

ertchen / tornado Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tornadoweb/tornado

0.0 0.0 0.0 9.89 MB

Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed.

Home Page: http://www.tornadoweb.org/

License: Apache License 2.0

Shell 0.25% Python 99.60% C 0.10% HTML 0.01% Cython 0.05%

tornado's Introduction

Tornado Web Server

Join the chat at https://gitter.im/tornadoweb/tornado

Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed. By using non-blocking network I/O, Tornado can scale to tens of thousands of open connections, making it ideal for long polling, WebSockets, and other applications that require a long-lived connection to each user.

Hello, world

Here is a simple "Hello, world" example web app for Tornado:

import asyncio
import tornado

class MainHandler(tornado.web.RequestHandler):
    def get(self):
        self.write("Hello, world")

def make_app():
    return tornado.web.Application([
        (r"/", MainHandler),
    ])

async def main():
    app = make_app()
    app.listen(8888)
    await asyncio.Event().wait()

if __name__ == "__main__":
    asyncio.run(main())

This example does not use any of Tornado's asynchronous features; for that see this simple chat room.

Documentation

Documentation and links to additional resources are available at https://www.tornadoweb.org

tornado's People

Contributors

bdarnell avatar ajdavis avatar ploxiln avatar finiteloop avatar pitrou avatar minrk avatar mivade avatar alekstorm avatar takluyver avatar wolever avatar daftshady avatar suminandrew avatar leekchan avatar mrjoes avatar graingert avatar rgbkrk avatar dependabot[bot] avatar birkjernstrom avatar schlamar avatar garenchan avatar ovidiucp avatar homm avatar spaceone avatar jparise avatar tatiana avatar mr-ping avatar lilydjwg avatar dano avatar bergundy avatar james-viasat 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.