# Ignition data exchange with docker python files

**URL:** <https://forum.inductiveautomation.com/t/ignition-data-exchange-with-docker-python-files/84236>\
**Category:** Ignition\
**Created:** [January 13, 2024, 11:05am UTC](https://forum.inductiveautomation.com/t/ignition-data-exchange-with-docker-python-files/84236 "2024-01-13T11:05:09Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![chaoliang](https://avatars.discourse-cdn.com/v4/letter/c/ba8739/32.png) [@chaoliang](https://forum.inductiveautomation.com/u/chaoliang)\
**Post date:** [January 13, 2024, 11:05am UTC](https://forum.inductiveautomation.com/t/ignition-data-exchange-with-docker-python-files/84236/1 "2024-01-13T11:05:09Z")

</div>

I am thinking about using redis to exchange data, but when importing redis to the pylib, it has error when running it.

It might be a big amount of data exchanging at ms speed with multiple clients accessing it.

I can use opcua, but it's just not a neat way.

or any other nosql database I can use?

---

<div class="post-metadata">

**Author:** ![chaoliang](https://avatars.discourse-cdn.com/v4/letter/c/ba8739/32.png) [@chaoliang](https://forum.inductiveautomation.com/u/chaoliang)\
**Post date:** [January 13, 2024, 1:29pm UTC](https://forum.inductiveautomation.com/t/ignition-data-exchange-with-docker-python-files/84236/2 "2024-01-13T13:29:25Z")

</div>

Tried Jedis, redis-python, none of them work on ignition.

---

<div class="post-metadata">

**Author:** ![chaoliang](https://avatars.discourse-cdn.com/v4/letter/c/ba8739/32.png) [@chaoliang](https://forum.inductiveautomation.com/u/chaoliang)\
**Post date:** [January 14, 2024, 11:37am UTC](https://forum.inductiveautomation.com/t/ignition-data-exchange-with-docker-python-files/84236/3 "2024-01-14T11:37:44Z")

</div>

I spent a few hours to try out the Redis solution, still not working from Ignition side.

Then I moved on to setup a Sparkplug MQTT client to talk to the Ignition gateway, it's ok to pub/sub some tags, but the amount of work will increase tremendously if I want to share hundreds of tags, including JSON files and UDT instances, between Ignition and external python files.

Just wonder what could be the easiest and neat way of exchange a few hundred data between ignition and external python file?

Any suggestion is welcomed.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [January 14, 2024, 1:22pm UTC](https://forum.inductiveautomation.com/t/ignition-data-exchange-with-docker-python-files/84236/4 "2024-01-14T13:22:45Z")

</div>

WebDev. Make an API that python can call.

Or, may an API with python that Ignition can call.

---

<div class="post-metadata">

**Author:** ![chaoliang](https://avatars.discourse-cdn.com/v4/letter/c/ba8739/32.png) [@chaoliang](https://forum.inductiveautomation.com/u/chaoliang)\
**Post date:** [January 16, 2024, 1:25pm UTC](https://forum.inductiveautomation.com/t/ignition-data-exchange-with-docker-python-files/84236/5 "2024-01-16T13:25:51Z")

</div>

I was using web dev api mainly for the front end React communication

I will have a try to use python script to call the API.

Meanwhile trying the new MongoDB module, but somehow still cannot get the local MongoDB setup correctly in the Connectors page.

---

<div class="post-metadata">

**Author:** ![chaoliang](https://avatars.discourse-cdn.com/v4/letter/c/ba8739/32.png) [@chaoliang](https://forum.inductiveautomation.com/u/chaoliang)\
**Post date:** [May 7, 2024, 12:44am UTC](https://forum.inductiveautomation.com/t/ignition-data-exchange-with-docker-python-files/84236/6 "2024-05-07T00:44:54Z")

</div>

Just to update:  
The mongo db is working fine so far exchanging data between ignition and docker python files.

I chatted with a IT engineer who is working on Real Time Operating System design, he said, no matter how fancy Redis/MongoDB/Other DB are, the local binary file read/write is always the easiest and fastest way to exchange data between different applications within the same PC.

Not sure whether anyone has different opinion to it?

Cheers

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 7, 2024, 2:21am UTC](https://forum.inductiveautomation.com/t/ignition-data-exchange-with-docker-python-files/84236/7 "2024-05-07T02:21:42Z")

</div>

I would say shared memory regions with lockless ring buffers. Basically the technology used for virtual machine host-guest virtio drivers.

---

<div class="post-metadata">

**Author:** ![chaoliang](https://avatars.discourse-cdn.com/v4/letter/c/ba8739/32.png) [@chaoliang](https://forum.inductiveautomation.com/u/chaoliang)\
**Post date:** [May 7, 2024, 3:38am UTC](https://forum.inductiveautomation.com/t/ignition-data-exchange-with-docker-python-files/84236/8 "2024-05-07T03:38:03Z")

</div>

Thanks for sharing the experience.

Ring buffer is new to me, need a bit time to research.
