Skip to main content

Transport classes and utilities shared among Python Elastic client libraries

Project description


Transport classes and utilities shared among Python Elastic client libraries

This library was lifted from elasticsearch-py and then transformed to be used across all Elastic services rather than only Elasticsearch.

User Guide

For almost all use-cases you should not need this library. The below use-cases are the common ones:

Creating your own Connection Class

If you need to have custom behavior for a Connection you can subclass the base connection class you want and then pass the class in via connection_class:

from elastic_transport import Urllib3HttpConnection
from elastic_enterprise_search import EnterpriseSearch

class CustomHttpConnection(Urllib3HttpConnection):
    ... # Custom HTTP behavior

# Create the Client with 'connection_class' defined
client = EnterpriseSearch(

The above also works for ConnectionPool (via connection_pool_class) and Transport (via transport_class).

Connection Classes

elastic-transport-python supports two HTTP client libraries:


This is the default connection class. This connection class uses urllib3` to issue requests. Read more about urllib3 on Read the Docs.


This connection class requires the Requests library to be installed to use:

$ python -m pip install requests

This class is often useful when using libraries that integrate with Requests. Read more about Requests on Read the Docs.


elastic-transport-python is available under the Apache-2.0 license. For more details see LICENSE.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

elastic-transport-0.1.0.dev2.tar.gz (22.4 kB view hashes)

Uploaded Source

Built Distribution

elastic_transport-0.1.0.dev2-py2.py3-none-any.whl (31.5 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page