U
U
usyginso2021-12-17 15:42:06
Python
usyginso, 2021-12-17 15:42:06

What is the best way to organize the interaction of two python scripts?

I see a chain like this: the first script works in the background, and every n times it calls to a certain "buffer" where the string values ​​sent by the user are stored. At a time, the script takes 1 value, after which it removes it from the "buffer". Then the script somehow launches the second script and passes this value to it, in response somehow receives the processed value, processes it and reports the result to the user. What is the best way to organize such a chain?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
Konstantin Malyarov, 2021-12-17
@Konstantin18ko

I would do this if on my knee:
Script_1 -> MongoDB -> Script_2
More adequately:
Script_1 -> rabbitmq or redis -> Script_2
In the first case, in the middle is a nosql base that does not require a preliminary object structure.
In the second case, the message broker.

H
HemulGM, 2021-12-17
@HemulGM

websocket. Those. microservice
Connecting a couple of lines. One line communication

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question