Documentation for the code scaffolding
This commit is contained in:
@@ -0,0 +1,13 @@
|
|||||||
|
API Documentation
|
||||||
|
=================
|
||||||
|
|
||||||
|
.. py:module:: elasticsearch
|
||||||
|
|
||||||
|
.. autoclass:: Elasticsearch
|
||||||
|
|
||||||
|
.. autoclass:: Transport
|
||||||
|
|
||||||
|
.. autoclass:: ConnectionPool
|
||||||
|
|
||||||
|
.. autoclass:: Connection
|
||||||
|
|
||||||
@@ -27,6 +27,8 @@ import sys, os
|
|||||||
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
|
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
|
||||||
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest']
|
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest']
|
||||||
|
|
||||||
|
autoclass_content = "init"
|
||||||
|
|
||||||
# Add any paths that contain templates here, relative to this directory.
|
# Add any paths that contain templates here, relative to this directory.
|
||||||
templates_path = ['_templates']
|
templates_path = ['_templates']
|
||||||
|
|
||||||
|
|||||||
+8
-1
@@ -1,6 +1,11 @@
|
|||||||
Python Elasticsearch Client
|
Python Elasticsearch Client
|
||||||
===========================
|
===========================
|
||||||
|
|
||||||
|
Official low-level client for Elasticsearch. It's goal is to provide common
|
||||||
|
ground for all Elasticsearch-related code in Python; because of this it tries
|
||||||
|
to be opinion-free and very extendable.
|
||||||
|
|
||||||
|
|
||||||
Example Usage
|
Example Usage
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
@@ -45,11 +50,13 @@ Example Usage
|
|||||||
Got 1 Hits:
|
Got 1 Hits:
|
||||||
2010-10-10T10:10:10 kimchy: Elasticsearch: cool. bonsai cool.
|
2010-10-10T10:10:10 kimchy: Elasticsearch: cool. bonsai cool.
|
||||||
|
|
||||||
Contents:
|
Contents
|
||||||
|
--------
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 2
|
:maxdepth: 2
|
||||||
|
|
||||||
|
api
|
||||||
|
|
||||||
License
|
License
|
||||||
-------
|
-------
|
||||||
|
|||||||
@@ -47,6 +47,21 @@ def query_params(*es_query_params):
|
|||||||
|
|
||||||
class Elasticsearch(object):
|
class Elasticsearch(object):
|
||||||
def __init__(self, hosts=None, **kwargs):
|
def __init__(self, hosts=None, **kwargs):
|
||||||
|
"""
|
||||||
|
Elasticsearch low-level client. Provides a straightforward mapping from
|
||||||
|
Python to ES REST endpoints.
|
||||||
|
|
||||||
|
:arg hosts: list of nodes we should connect to. Node should be a
|
||||||
|
dictionary ({"host": "localhost", "port": 9200}), the entire dictionary
|
||||||
|
will be passed to the :class:`~elasticsearch.Connection` class as
|
||||||
|
kwargs, or a string in the format ot ``host[:port]`` which will be
|
||||||
|
translated to a dictionary automatically. If no value is given the
|
||||||
|
:class:`~elasticsearch.Connection` class defaults will be used.
|
||||||
|
|
||||||
|
:arg kwargs: any additional arguments will be passed on to the
|
||||||
|
:class:`~elasticsearch.Transport` class and, subsequently, to the
|
||||||
|
:class:`~elasticsearch.Connection` instances.
|
||||||
|
"""
|
||||||
self.transport = Transport(_normalize_hosts(hosts), **kwargs)
|
self.transport = Transport(_normalize_hosts(hosts), **kwargs)
|
||||||
|
|
||||||
@query_params('timeout')
|
@query_params('timeout')
|
||||||
|
|||||||
Reference in New Issue
Block a user