You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+41-31Lines changed: 41 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,9 +19,8 @@
19
19
20
20
**Freak** is primarily composed of two components, Engine and Flow, which are further divided into smaller components. Engine is encapsulation of logic on how to read flows and execute them in order of specified definition. Engine does this using components:
21
21
22
-
-**Factory**
23
22
-**Butler**
24
-
-**Prosecutioner**
23
+
-**Executor**
25
24
-**Inspector**
26
25
27
26
Before explaining about these components, it is a good idea to understand what exactly is a flow in a Freak and how it is implemented. A flow is nothing but a set of steps intended to achieve an objective. This objective can be anything that is identifiable as business logic. The implementation of flow is done by defining three components:
@@ -30,15 +29,11 @@ Before explaining about these components, it is a good idea to understand what e
30
29
31
30
-**Locator**, it uses flow decorator to locate steps defined in a module (module here is used as reference to single python file). Every flow is required to define one of its own, so that `Butler` can use it to identify and execute the flow.
32
31
33
-
-**Organizer**, as the name suggests is responsible for organizing the steps of a flow. Every flow id required to define one of its own. Currently, only linear flow is implemented.
34
-
35
32
Since, we have a basic understanding of what exactly a flow in freak is, let's move on to engine components.
36
33
37
-
-**Factory** is responsible for collecting `Locator` and `Organizer` for defined flow. It works as input generator for `Butler`.
38
-
39
-
-**Butler** is responsible for reading python modules, locating steps and organizing them using locator and organizer provided by factory.
34
+
-**Butler** is responsible for reading python modules, locating steps and organizing them using locator specified by flow.
40
35
41
-
-**Prosecutioner** is core component of the engine. It is responsible for executing steps. Currently, it only supports linear flows.
36
+
-**Executor** is core component of the engine. It is responsible for executing steps. Currently, it only supports linear flows.
42
37
43
38
-**Inspector** is used to return input schema for every step defined by the flow. This is intended to be part of view logic of the engine.
44
39
@@ -47,11 +42,11 @@ Since, we have a basic understanding of what exactly a flow in freak is, let's m
47
42
This is how you define a flow using base flow.
48
43
49
44
```python
50
-
from freak.engine import butler, inspector, prosecutioner
51
-
from freak.flows.base_flow import base_flow, locator, organizer
45
+
from freak.flows.base_flow import base_flow
52
46
from freak.models.input import InputModel, InputModelB
53
47
from freak.models.request import RequestContext
54
48
from freak.models.response import Response, SuccessResponseContext
0 commit comments