<commit_before>Celery integration with Tornado
===============================

.. image:: https://badge.fury.io/py/tornado-celery.png
        :target: http://badge.fury.io/py/tornado-celery
.. image:: https://pypip.in/d/tornado-celery/badge.png
        :target: https://crate.io/packages/tornado-celery/

tornado-celery is a non-blocking Celery client for Tornado web framework

Usage
-----

Calling Celery tasks from Tornado RequestHandler: ::

    from tornado import gen, web
    import tcelery, tasks

    tcelery.setup_nonblocking_producer()

    class AsyncHandler(web.RequestHandler):
        @asynchronous
        def get(self):
            tasks.echo.apply_async(args=['Hello world!'], callback=self.on_result)

        def on_result(self, response):
            self.write(str(response.result))<commit_msg>Use shields.io badges<commit_after>Celery integration with Tornado
===============================

.. image:: https://img.shields.io/pypi/v/tornado-celery.svg
    :target: https://pypi.python.org/pypi/tornado-celery

.. image:: https://img.shields.io/pypi/dm/tornado-celery.svg
        :target: https://pypi.python.org/pypi/tornado-celery

tornado-celery is a non-blocking Celery client for Tornado web framework

Usage
-----

Calling Celery tasks from Tornado RequestHandler: ::

    from tornado import gen, web
    import tcelery, tasks

    tcelery.setup_nonblocking_producer()

    class AsyncHandler(web.RequestHandler):
        @asynchronous
        def get(self):
            tasks.echo.apply_async(args=['Hello world!'], callback=self.on_result)

        def on_result(self, response):
            self.write(str(response.result))
{'fraction_non_alphanumeric': 0.15389257694628847, 'fraction_numerical': 0.0, 'mean_word_length': 3.328981723237598, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 7, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7602510', 'n_tokens_mistral': 550, 'n_tokens_neox': 525, 'n_words': 101}