This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Extends the official Elasticsearch Python API adding Tornado AsyncHTTPClient support.

Installation

tornado_elasticsearch is available on the Python Package Index and can be installed using pip or easy_install:

pip install tornado_elasticsearch

Example Request Handlers

from tornado import gen
from tornado import web
from tornado_elasticsearch import AsyncElasticsearch
import uuid

class Example(web.RequestHandler):

    def initialize(self):
        self.es = AsyncElasticsearch()

    @web.asynchronous
    @gen.engine
    def delete(self, *args, **kwargs):
        result = yield self.es.delete(index='test-index', doc_type='tweet',
                                      id=self.get_argument('id'))
        self.finish(result)

    @web.asynchronous
    @gen.engine
    def get(self, *args, **kwargs):
        if self.get_argument('id', None):
            result = yield self.es.get(index='test-index', doc_type='tweet',
                                       id=self.get_argument('id'))
        else:
            result = yield self.es.search(index='test-index')
        self.finish(result)

    @web.asynchronous
    @gen.engine
    def post(self, *args, **kwargs):
        doc = {
            'author': self.get_current_user() or 'Unknown',
            'text': self.get_argument('text'),
            'timestamp': datetime.datetime.now()
        }
        result = yield self.es.index(index='test-index',
                                     doc_type='tweet',
                                     body=doc,
                                     id=str(uuid.uuid4()))
        self.finish(result)


class Info(web.RequestHandler):

    @web.asynchronous
    @gen.engine
    def get(self, *args, **kwargs):
        es = AsyncElasticsearch()
        info = yield es.info()
        self.finish(info)

Version History

  • 0.3.0: Bugfix: Add body to log_request_fail call (#1)
  • 0.2.0: Bugfix: force method to POST if GET and body passed
  • 0.1.0: Initial version
Release History

Release History

0.4.0

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.3.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
tornado_elasticsearch-0.4.0-py2-none-any.whl (11.8 kB) Copy SHA256 Checksum SHA256 2.7 Wheel Oct 17, 2015
tornado_elasticsearch-0.4.0.tar.gz (10.3 kB) Copy SHA256 Checksum SHA256 Source Oct 17, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting