# Web Sockets in Ignition

**URL:** <https://forum.inductiveautomation.com/t/web-sockets-in-ignition/55955>\
**Category:** Ignition\
**Created:** [February 9, 2022, 9:39pm UTC](https://forum.inductiveautomation.com/t/web-sockets-in-ignition/55955 "2022-02-09T21:39:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nicholas.robinson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nicholas.robinson/32/22188_2.png) [@nicholas.robinson](https://forum.inductiveautomation.com/u/nicholas.robinson)\
**Post date:** [February 9, 2022, 9:39pm UTC](https://forum.inductiveautomation.com/t/web-sockets-in-ignition/55955/1 "2022-02-09T21:39:42Z")

</div>

I am trying to query against Kafka SQL (Lense) and the part of the API that you do the query in requires web sockets.

[https://api.lenses.io/branches/4.3/index.html#data-access-query-data-via-sql-get](https://api.lenses.io/branches/4.3/index.html#data-access-query-data-via-sql-get)

Is there a Python / Jython library available inside of Ignition that can be used for web sockets?

Or, is this a module only discussion?

Looking for the equivalent of this, but available inside of the Ignition environment.

[https://websockets.readthedocs.io/en/3.0/intro.html](https://websockets.readthedocs.io/en/3.0/intro.html)

Thanks,

Nick

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [February 9, 2022, 9:45pm UTC](https://forum.inductiveautomation.com/t/web-sockets-in-ignition/55955/2 "2022-02-09T21:45:31Z")

</div>

There are a variety of websocket-capable HTTP clients in a typical Ignition install.

Probably the easiest entrypoint would be [`system.net.httpClient().javaClient.newWebSocketBuilder()`](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpClient.html#newWebSocketBuilder()).

Actual usage will require a fair number of Java imports and won’t be particularly ‘pythonic’, _but_ will probably be far, far more performant than trying to import a ready made Python example that relies on the Python standard library.

Note: This is for a websocket _client_. Creating a websocket server would effectively require a module.
