# Driver for Python with TCP

**URL:** <https://discuss.elastic.co/t/driver-for-python-with-tcp/141964>\
**Category:** Elasticsearch\
**Created:** [July 27, 2018, 3:23pm UTC](https://discuss.elastic.co/t/driver-for-python-with-tcp/141964 "2018-07-27T15:23:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![iam.Carrot](https://avatars.discourse-cdn.com/v4/letter/i/a9adbd/32.png) [@iam.Carrot](https://discuss.elastic.co/u/iam.Carrot)\
**Post date:** [July 27, 2018, 3:23pm UTC](https://discuss.elastic.co/t/driver-for-python-with-tcp/141964/1 "2018-07-27T15:23:33Z")

</div>

Hi I am working with the python driver for elasticsearch.  
[according to the docs here](https://www.elastic.co/guide/en/elasticsearch/client/python-api/current/index.html)

And it uses `http` with `port 9200` to connect and work with elastic for the queries.

Is there a way I can use `TCP 9300` using the python driver?

I ask because on Java, I used a driver that used `TCP 9300` to connect and was way more fast.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [July 29, 2018, 2:45pm UTC](https://discuss.elastic.co/t/driver-for-python-with-tcp/141964/2 "2018-07-29T14:45:26Z")

</div>

The transport protocol, which be default uses port 9300, is only available on the JVM, and we are moving to deprecate this and [replace it with a high-level REST client also for Java](https://www.elastic.co/blog/the-elasticsearch-java-high-level-rest-client-is-out). All non-JVM based clients, including the Python client, are restricted to using the HTTP protocol on port 9200. That said, [the difference in performance between HTTP and the transport protocol should not be very large](https://www.elastic.co/blog/benchmarking-rest-client-transport-client).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 26, 2018, 2:45pm UTC](https://discuss.elastic.co/t/driver-for-python-with-tcp/141964/3 "2018-08-26T14:45:29Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
