Category index for “tornado”

  • Tornado and pgettext

    Tornado and pgettext

    Recently (26.05.2015) new tornado 4.2 was released. It contains different updates, the most valuable i suppose are modules tornado.locks and tornado.queues. They migrated from package Toro, look detailed explanation in Jesse Jiryu Davis post.

    Here i want to tell about another helpful function, that was added with my help - pgettext.

    Comments Read More
  • Tornado i18n and l10n

    Star

    Tornado i18n and l10n

    Let’s talk about i18n, i10n and tornado implementation. This post have a lot of text, but i wanted to describe many things that i faced during realization of i18n in tornado project. The step by step instruction is placed in the second part of this article.

    Comments Read More
  • Set url for Tornado handlers

    Set url for Tornado handlers

    To set url for tornado handlers we can pass list of tuples (url regex, handler) into application initialisation:

    application = tornado.web.Application([
        (r"/", MainHandler),
        (r"/some/path/page/(?P<pk>[0-9]+)$", PageHandler),
    ])
    

    But it is more convenient to use wrapper tornado.web.url, that allows to assign meaningful names for paths (similar to django url).

    Comments Read More
  • Async Bitcoin RPC client

    Star

    To work with Bitcoin RPC from python there is a library Python-BitcoinRPC.

    But recently i need to call API from tornado application. Mentioned lib works in synchronous, i.e. blocking mode. For tornado it will be much better to use asynchronous version. Tried to search for existing solution, but can’t find it. So i create my async fork, that use tornado’s AsyncHTTPClient: https://github.com/st4lk/python-bitcoinrpc-tornado.

    Comments Read More
  • Tornado web application example

    Star

    Tornado web application example

    Tornado - async web framework for python. I’ll cover shortly pros and cons about tornado and introduce typical web project, that is built on top of it.

    By describing pros and cons i mean my own point of view in compare with django.

    Comments Read More