Articles Tagged async

Tornado i18n and l10n

Tornado i18n and i10n

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.

Common definitions


i18n - shorthand from internationalization. It mean the process of multiple languages support in application. It is not the translation itself, but technical part of the ...

Posted on 2015-01-31

Django celery setup

Django celery setup

To enable celery in new django project i often look in previous ones to refresh in my memory some steps: what settings should be specified, how to launch, how to stop and so on.

Here i want to combine all together in one place.

What we must get as a result

  1. Add delayed task executing in django project, controlled by celery, to not load current django process. Examples of such tasks: email sending, working with ...

Posted on 2014-11-02

Async Bitcoin RPC client

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:

Example (print current number of blocks ...

Posted on 2014-01-30

Tornado web application example

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.

Tornado pros

1. Asynchronous.

In tornado core there is a infinite loop called "ioloop", that listen for events. All that happens in one single thread. For example, somebody wants to fetch /home ...

Posted on 2013-12-29