background preloader

Tornado Web Server — Tornado 4.1 documentation

Tornado Web Server — Tornado 4.1 documentation
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. Upgrade notes As of Tornado 3.2, the backports.ssl_match_hostname package must be installed when running Tornado on Python 2. This will be installed automatically when using pip or easy_install. Hello, world Here is a simple “Hello, world” example web app for Tornado: import tornado.ioloop import tornado.web class MainHandler(tornado.web.RequestHandler): def get(self): self.write("Hello, world") application = tornado.web.Application([ (r"/", MainHandler), ]) if __name__ == "__main__": application.listen(8888) tornado.ioloop.IOLoop.instance().start() This example does not use any of Tornado’s asynchronous features; for that see this simple chat room. Installation

http://tornado.readthedocs.org/en/latest/

Related:  python

SnakeViz SnakeViz is a browser based graphical viewer for the output of Python’s cProfile module. It was originally inspired by RunSnakeRun. SnakeViz works on Python 2.6, 2.7, and Python 3. opensocial-python-client - Project Hosting on Google Code Better than french toast! The OpenSocial Python Client Library enables you to work with OpenSocial data on your server, in the language of your choice - as long as it's Python :P See the project roadmap for version information.

Using PyObjC for Developing Cocoa Applications with Python Cocoa Frameworks The Cocoa frameworks consist of libraries, APIs, and runtimes that form the development layer for all of OS X. By developing with Cocoa, you will be creating applications the same way OS X itself is created. Your application will automatically inherit the great behaviors and appearances of OS X, with full access to the underlying power of the UNIX operating system. Using Cocoa with the Xcode IDE is simply the best way to create native Mac applications. The Power of Objective-C HTML 5 C# Web Sockets server and ASP.NET client implementation In the previous post we saw that Web Sockets are the best invention since sliced bread: they bring to the web the bidirectional full-duplex communication traditional desktop applications have been enjoying for quite some time now. It solves many current problems, and enables much more powerful applications than current standards. I’ve developed a very basic Web Socket server implementation in C# just as a proof of concept. It handles the most basic operations you would expect from a server: start a new connection, disconnect, and send and receive data. Besides, I’ve developed the client part as well using regular ASP.NET. Actually it’s just plain HTML and JavaScript being served from an ASP.NET server – this example doesn’t use any fancy runat=server controls or anything of the like.

Python Runtime Environment - Google App Engine - Google Code Welcome to Google App Engine for Python! With App Engine, you can build web applications using the Python programming language, and take advantage of the many libraries, tools and frameworks for Python that professional developers use to build world-class web applications. Your Python application runs on Google's scalable infrastructure, and uses large-scale persistent storage and services. Introduction App Engine executes your Python application code using a pre-loaded Python interpreter in a safe "sandboxed" environment. Twisted Twisted is an event-driven networking engine written in Python and licensed under the open source MIT license. Twisted makes it easy to implement custom network applications. Here's a TCP server that echoes back everything that's written to it:

Real-Time Web Technologies Guide Note: This page is a work in progress. I plan to update it new technologies as I find them and increase the information on each as I find the time. If you know of a technology that should be included in this guide then please raise a pull request. If you have any questions please drop me an email me As above, you can contribute to the list by making a pull request to the Realtime Web Technologies Guide github repo. Hosted Realtime Services Design Patterns in Python Alex Martelli is a leading light of the Python programming language community. He is a leader in the development of the language, author of Python in a Nutshell and has written extensively on Python in other books and articles. Last week he spoke to the SDForum Software Architecture and Modeling SIG on "Design Patterns in Python".

Beautiful Soup: We called him Tortoise because he taught us. You didn't write that awful page. You're just trying to get some data out of it. Beautiful Soup is here to help. Since 2004, it's been saving programmers hours or days of work on quick-turnaround screen scraping projects.

Related:  python 2communication tech solutions