Answer the question
In order to leave comments, you need to log in
How to implement a constructor of algorithms (rules) in Python?
Is there a way to implement an interface for creating algorithms from the UI, avoiding a lot of if-s?
Scope of application - financial exchange. For example, when a certain price is reached (<, >, =), place/cancel an order.
It is necessary to create these conditions from the interface (previously Django).
Answer the question
In order to leave comments, you need to log in
such systems are called the English word "query builder"
you can see an example here
At the moment, I settled on the idea of creating a template engine using eval ().
Things like this are implemented with a decision tree . And if it is necessary that the result of the decision was a code that implements some algorithm, then in the process of bypassing the nodes of the decision tree, you can form an abstract syntax tree . In general, the task is from the category of creating a DSL and an interpreter for it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question