epmwebapi 6.0.39__tar.gz → 6.50.38__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. epmwebapi-6.50.38/PKG-INFO +73 -0
  2. epmwebapi-6.50.38/epmwebapi/_version.py +1 -0
  3. epmwebapi-6.50.38/epmwebapi/advancedevent.py +61 -0
  4. epmwebapi-6.50.38/epmwebapi/attributeoperand.py +18 -0
  5. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/authorizationservice.py +1 -1
  6. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/basicvariable.py +6 -0
  7. epmwebapi-6.50.38/epmwebapi/elementoperand.py +56 -0
  8. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/epmconnection.py +450 -5
  9. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/epmmodelobject.py +28 -0
  10. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/epmnodeids.py +4 -0
  11. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/epmobject.py +8 -0
  12. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/epmvariable.py +19 -9
  13. epmwebapi-6.50.38/epmwebapi/eventfiltermodel.py +24 -0
  14. epmwebapi-6.50.38/epmwebapi/filtermodel.py +20 -0
  15. epmwebapi-6.50.38/epmwebapi/filteroperand.py +2 -0
  16. epmwebapi-6.50.38/epmwebapi/historyeventmodeljson.py +24 -0
  17. epmwebapi-6.50.38/epmwebapi/literaloperand.py +18 -0
  18. epmwebapi-6.50.38/epmwebapi/numpyextras.py +290 -0
  19. epmwebapi-6.50.38/epmwebapi/queryfiltercontent.py +15 -0
  20. epmwebapi-6.50.38/epmwebapi/queryfilterelement.py +17 -0
  21. epmwebapi-6.50.38/epmwebapi/querymodelfilterJSON.py +27 -0
  22. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/queryresultmask.py +2 -0
  23. epmwebapi-6.50.38/epmwebapi/simpleattributeoperand.py +17 -0
  24. epmwebapi-6.50.38/epmwebapi/typeevent.py +69 -0
  25. epmwebapi-6.50.38/epmwebapi.egg-info/PKG-INFO +73 -0
  26. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi.egg-info/SOURCES.txt +15 -1
  27. epmwebapi-6.50.38/pyproject.toml +22 -0
  28. epmwebapi-6.50.38/setup.cfg +4 -0
  29. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/setup.py +1 -1
  30. epmwebapi-6.0.39/PKG-INFO +0 -65
  31. epmwebapi-6.0.39/epmwebapi/_version.py +0 -1
  32. epmwebapi-6.0.39/epmwebapi/numpyextras.py +0 -125
  33. epmwebapi-6.0.39/epmwebapi.egg-info/PKG-INFO +0 -65
  34. epmwebapi-6.0.39/setup.cfg +0 -8
  35. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/LICENSE.txt +0 -0
  36. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/Readme.md +0 -0
  37. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/__init__.py +0 -0
  38. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/aggregatedetails.py +0 -0
  39. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/annotationvaluejson.py +0 -0
  40. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/autostarttimer.py +0 -0
  41. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/basicvariablepropertymask.py +0 -0
  42. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/browsedirection.py +0 -0
  43. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/browseitemmodeljson.py +0 -0
  44. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/browsemodeljson.py +0 -0
  45. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/browseresultitemmodeljson.py +0 -0
  46. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/browseresultmodeljson.py +0 -0
  47. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/customtypedefinition.py +0 -0
  48. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/dataobjectattributes.py +0 -0
  49. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/dataobjectsfilter.py +0 -0
  50. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/datasetconfig.py +0 -0
  51. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/datasetpen.py +0 -0
  52. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/datavaluejson.py +0 -0
  53. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/diagnosticmodeljson.py +0 -0
  54. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/dll_references/Elipse.Epm.AddressSpaceModel.dll +0 -0
  55. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/dll_references/ElipseLoggerInterface.dll +0 -0
  56. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/dll_references/EpmData.dll +0 -0
  57. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/dll_references/Microsoft.Extensions.Logging.Abstractions.dll +0 -0
  58. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/domainfilter.py +0 -0
  59. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/downloadtype.py +0 -0
  60. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/epmconnectioncontext.py +0 -0
  61. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/epmdataobject.py +0 -0
  62. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/epmproperty.py +0 -0
  63. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/epmsession.py +0 -0
  64. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/epmutils.py +0 -0
  65. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/epmwebapi.py +0 -0
  66. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/exporttype.py +0 -0
  67. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/folder.py +0 -0
  68. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/historyprocessedmodeljson.py +0 -0
  69. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/historyrawmodeljson.py +0 -0
  70. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/historyresultitemmodeljson.py +0 -0
  71. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/historyresultmodeljson.py +0 -0
  72. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/historyupdatedataitemmodeljson.py +0 -0
  73. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/historyupdatedatamodeljson.py +0 -0
  74. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/historyupdateresultmodeljson.py +0 -0
  75. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/historyupdatetype.py +0 -0
  76. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/itempathandcontinuationpointjson.py +0 -0
  77. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/itempathjson.py +0 -0
  78. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/mimetype.py +0 -0
  79. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/nodeattributes.py +0 -0
  80. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/nodeclassmask.py +0 -0
  81. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/performupdatetype.py +0 -0
  82. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/portalresources.py +0 -0
  83. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/processorresources.py +0 -0
  84. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/querymodeljson.py +0 -0
  85. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/queryperiod.py +0 -0
  86. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/queryresultitemmodeljson.py +0 -0
  87. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/queryresultmodeljson.py +0 -0
  88. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/readitemmodeljson.py +0 -0
  89. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/readmodeljson.py +0 -0
  90. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/readresultitemmodeljson.py +0 -0
  91. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/readresultmodeljson.py +0 -0
  92. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/report.py +0 -0
  93. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/resource.py +0 -0
  94. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/resourcesmanager.py +0 -0
  95. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/statuscodes.py +0 -0
  96. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/writeitemmodeljson.py +0 -0
  97. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi/writemodeljson.py +0 -0
  98. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi.egg-info/dependency_links.txt +0 -0
  99. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi.egg-info/requires.txt +0 -0
  100. {epmwebapi-6.0.39 → epmwebapi-6.50.38}/epmwebapi.egg-info/top_level.txt +0 -0
@@ -0,0 +1,73 @@
1
+ Metadata-Version: 2.4
2
+ Name: epmwebapi
3
+ Version: 6.50.38
4
+ Home-page: https://github.com/elipsesoftware/epmwebapi
5
+ Author: Elipse Software Ltda
6
+ License-Expression: GPL-3.0-only
7
+ Classifier: Development Status :: 3 - Alpha
8
+ Classifier: Intended Audience :: Developers
9
+ Classifier: Topic :: Software Development :: Build Tools
10
+ Classifier: Programming Language :: Python :: 3.10
11
+ Classifier: Programming Language :: Python :: 3.11
12
+ Classifier: Programming Language :: Python :: 3.12
13
+ Requires-Python: >=3.6, <4
14
+ Description-Content-Type: text/markdown
15
+ License-File: LICENSE.txt
16
+ Requires-Dist: numpy
17
+ Requires-Dist: requests
18
+ Requires-Dist: python-dateutil
19
+ Requires-Dist: pytz
20
+ Requires-Dist: pythonnet
21
+ Dynamic: author
22
+ Dynamic: home-page
23
+ Dynamic: license-file
24
+ Dynamic: requires-python
25
+
26
+ # epmwebapi
27
+
28
+ A biblioteca **Epmwebapi** desenvolvida pela **Elipse Software**, permite a interação com os dados da sua plataforma
29
+ **Elipse Plant Manager(EPM)**. Possibilitando flexibilidade para buscar, organizar, analisar, compartilhar e monitorar os dados de processo industrial.
30
+
31
+ Seu uso típico, mas não exclusivo, é a geração de indicadores, análises de dados, estatística e inteligência de processo voltados para sistemas industriais como Indústria Química, Petroquímica, Papel e Celulose, Siderúrgica, Energia, Saneamento, Data Centers, Prédios Inteligentes, entre outros.
32
+
33
+ Mais informações sobre o **EPM** podem ser encontradas no site https://www.elipse.com.br/produto/elipse-plant-manager/
34
+
35
+ **Requisitos:**
36
+ * EPM Webserver 3.06 (para acesso aos dados do EPM Server, não precisa estar instalado na mesma máquina da epmwebapi).
37
+ * Python 3.6 x64 ou superior
38
+
39
+ **Instalação:**
40
+
41
+ Online(Recomendado):
42
+ * Após instalar o Python, digite no prompt de comando ou terminal: *pip install epmwebapi*. O instalador se encarregará de baixar e instalar a biblioteca e suas dependências.
43
+
44
+ Offline:
45
+ * Faça do download do pacote através do site da [Elipse](https://www.elipse.com.br/downloads).
46
+ * Faça a descompactação da pasta **epmwebapi** e copie para o diretório **site-packages** da instalação do Python.
47
+ * Instale as dependências: Bibliotecas Numpy, Requests e Python-dateutil.
48
+
49
+ **Exemplos:**
50
+
51
+ * [Exemplo básico](https://github.com/elipsesoftware/epmwebapi/blob/master/exemplos/Quickstart.ipynb) - Exemplos de leituras e escritas de dados e anotações.
52
+ * [Matplotlib](https://github.com/elipsesoftware/epmwebapi/blob/master/exemplos/basic_use_matplotlib.ipynb) - Utilizando essa biblioteca para gerar gráficos.
53
+ * [Pandas](https://github.com/elipsesoftware/epmwebapi/blob/master/exemplos/basic_use_pandas.ipynb) - Use Pandas para manipular dados tabulares.
54
+ * [Pandas e dataviz](https://github.com/elipsesoftware/epmwebapi/blob/master/exemplos/pandas_and_dataviz.ipynb) - Utilizando essas bibliotecar para manipular dados e gerar visualizções gráficas.
55
+ * [Numpy](https://github.com/elipsesoftware/epmwebapi/blob/master/exemplos/basic_use_numpy.ipynb) - Numpy é uma biblioteca essecial para trabalhar com cálculos de dados em matrizes.
56
+ * [Regressão por árvore de decisão](https://github.com/elipsesoftware/epmwebapi/blob/master/exemplos/decision_tree_regression.ipynb) - Veja como utilizar a biblioteca Scikit-learn para fazer uma regressão.
57
+ * [Utilizando Concorrência](https://github.com/elipsesoftware/epmwebapi/blob/master/exemplos/concorrencia_historyReadAggregate.ipynb) - Usando concorrência para alta performance de consultas ao EPM Server.
58
+ * [Buscando em um webserver e escrevendo no EPM Server](https://github.com/elipsesoftware/epmwebapi/blob/master/exemplos/write_from_webserver.ipynb) - Lendo dados de temperatura do Webserver do INPE e escrevendo em uma variável do EPM Server.
59
+ * [Machine Learning](https://github.com/elipsesoftware/epmwebapi/blob/master/exemplos/basic_use_machine_learning.ipynb) - Noções e exemplos de uso dessa técnica cada vez mais utilizada em dados de processo.
60
+ * [Análise de temperatura e conforto térmico](https://github.com/elipsesoftware/epmwebapi/blob/master/exemplos/temp_elipse_ecc.ipynb) - Análises de dados reais de temperaturas das salas da Elipse.
61
+ * [Criando mapas](https://github.com/elipsesoftware/epmwebapi/blob/master/exemplos/maps.ipynb) - Trabalhando com dados de geolocalização e mapas interativos.
62
+ * [Acessando informações do EPM Server](https://github.com/elipsesoftware/epmwebapi/blob/master/exemplos/server_information.ipynb) - Acessando informações como versão, chave de produto, diagnósticos dos Interface Servers, etc.
63
+
64
+
65
+
66
+
67
+
68
+
69
+
70
+
71
+
72
+
73
+
@@ -0,0 +1 @@
1
+ __version__ = '6.50.38'
@@ -0,0 +1,61 @@
1
+ from __future__ import annotations
2
+ from typing import Any, List
3
+ from numpy.typing import NDArray
4
+
5
+ from .elementoperand import ElementOperand
6
+ from .queryperiod import QueryPeriod
7
+ from .itempathjson import ItemPathJSON
8
+
9
+
10
+ class AdvancedEvent(object):
11
+ """
12
+ Class representing an Event Advanced.
13
+ """
14
+
15
+ def __init__(self, connection:EpmConnection, eventName:str):
16
+ self._connection = connection
17
+ self._eventPath = ItemPathJSON('OPCUA.BrowsePath', '', '1:Events/1:Advanced/1:' + eventName)
18
+
19
+
20
+ def historyRead(self, queryPeriod:QueryPeriod, where:ElementOperand=None, select:List[str]=['Time', 'Severity', 'EventId', 'PayloadVariables', 'PayloadValues']) -> NDArray[Any]:
21
+ """
22
+ Returns raw values from this Event within the configured period.
23
+
24
+ :param queryPeriod: An `epmwebapi.queryperiod.QueryPeriod` object with the period of time to query.
25
+ :type queryPeriod: epmwebapi.queryperiod.QueryPeriod
26
+ :param where: An optional parameter indicating the where condition to be applied. Default is None.
27
+ :type where: epmwebapi.elementoperand.ElementOperand
28
+ :param select: An optional parameter indicating the selected fields to be returned. Default is ['Time', 'Severity', 'EventId', 'PayloadVariables', 'PayloadValues'].
29
+ :type select: List[str]
30
+ :return: A numpy NDArray.
31
+ :rtype: np.NDArray
32
+
33
+ Examples
34
+ --------
35
+ The following examples show how to use historyRead function.
36
+
37
+ Retrives all events from a period of time:
38
+
39
+ .. code-block:: python
40
+
41
+ ini_date = dt.datetime.now(dt.timezone.utc) - dt.timedelta(hours=1)
42
+ end_date = dt.datetime.now(dt.timezone.utc)
43
+ queryPeriod = epm.QueryPeriod(ini_date, end_date)
44
+ typeEvent = connection.getAdvancedEvent('EventName')
45
+ result = typeEvent.historyRead(queryPeriod)
46
+
47
+ Retrieves all events where the Tag0023 is greater than 30 (Tag0023 must be inserted on Payload):
48
+
49
+ .. code-block:: python
50
+
51
+ ini_date = dt.datetime.now(dt.timezone.utc) - dt.timedelta(hours=1)
52
+ end_date = dt.datetime.now(dt.timezone.utc)
53
+ queryPeriod = epm.QueryPeriod(ini_date, end_date)
54
+ typeEvent = connection.getTypeEvent('PumpEventName')
55
+ where = ElementOperand(Operator.Greater, [SimpleAttributeOperand('Tag0023'), LiteralOperand(30)])
56
+ result = typeEvent.historyRead(queryPeriod, where)
57
+
58
+ """
59
+ return self._connection._historyReadEvent(queryPeriod, self._eventPath, select, where)
60
+
61
+
@@ -0,0 +1,18 @@
1
+ from .epmvariable import EpmVariable
2
+ from .filteroperand import FilterOperand
3
+
4
+ class AttributeOperand(FilterOperand):
5
+ """
6
+ AttributeOperand class
7
+ """
8
+ def __init__(self, variable:EpmVariable):
9
+ """
10
+ Creates a new instance of an AttributeOperand object.
11
+
12
+ :param variable: The variable used by this operand filter.
13
+ :type variable: :class:`EpmVariable`.
14
+ """
15
+ self._variable = variable
16
+
17
+ def toDict(self):
18
+ return {'type':'attribute', 'path':self._variable._itemPath.toDict(), 'alias': None, 'browsePath': None, 'attributeId': 13}
@@ -46,7 +46,7 @@ class AuthorizationService(object):
46
46
  post_data = {"grant_type": "password",
47
47
  "username": self._context.getUserName(),
48
48
  "password": self._context.getPassword(),
49
- "scope": "offline_access openid profile email opcua_browse opcua_read opcua_write opcua_subscription opcua_history EpmWebApi portal_files portal_upload"} #EpmProcessor #openid profile email opcua_browse opcua_read opcua_subscription
49
+ "scope": "offline_access openid profile email opcua_browse opcua_read opcua_write opcua_subscription opcua_history EpmWebApi portal_files portal_upload"}
50
50
  auth_url = self._context.getAuthServer() + '/connect/token'
51
51
 
52
52
  session = self._getSession()
@@ -57,6 +57,12 @@ class DataTypeId(Enum):
57
57
 
58
58
  DateTime = 13
59
59
 
60
+ ByteString = 15
61
+
62
+ NodeId = 17
63
+
64
+ DataValue = 23
65
+
60
66
  class BasicVariable(EpmDataObject):
61
67
  """
62
68
  Class representing an **EPM** Basic Variable.
@@ -0,0 +1,56 @@
1
+ from __future__ import annotations
2
+
3
+ from typing import List, Union
4
+
5
+ from .literaloperand import LiteralOperand
6
+ from .simpleattributeoperand import SimpleAttributeOperand
7
+ from .attributeoperand import AttributeOperand
8
+
9
+ from enum import Enum
10
+
11
+ class Operator(Enum):
12
+ """
13
+ Enumeration with all types of operators
14
+ """
15
+ Equals = "Equals"
16
+ IsNull = "IsNull"
17
+ GreaterThan = "GreaterThan"
18
+ LessThan = "LessThan"
19
+ GreaterThanOrEqual = "GreaterThanOrEqual"
20
+ LessThanOrEqual = "LessThanOrEqual"
21
+ Like = "Like"
22
+ Not = "Not"
23
+ Between = "Between"
24
+ InList = "InList"
25
+ And = "And"
26
+ Or = "Or"
27
+ Cast = "Cast"
28
+ InView = "InView"
29
+ OfType = "OfType"
30
+ RelatedTo = "RelatedTo"
31
+ BitwiseAnd = "BitwiseAnd"
32
+ BitwiseOr = "BitwiseOr"
33
+
34
+
35
+ class ElementOperand(object):
36
+ """
37
+ ElementOperand class
38
+ """
39
+ def __init__(self, operator:Operator, operands:List[Union[SimpleAttributeOperand,AttributeOperand,LiteralOperand,ElementOperand]]):
40
+ """
41
+ Creates a new instance of an ElementOperand object.
42
+
43
+ :param operator: The selected Operator enum.
44
+ :type operator: :class:`Operator`
45
+ :param operands: A list of filter operands that must be:
46
+ - :class:`SimpleAttributeOperand`: Operando for simple attributes.
47
+ - :class:`AttributeOperand`: Operand for generic attributes.
48
+ - :class:`LiteralOperand`: Operand for literal values.
49
+ - :class:`ElementOperand`: Operand to reference other filter elements.
50
+ :type operands: :class:`typing.List`
51
+ """
52
+ self._operator = operator
53
+ self._operands = operands
54
+
55
+ def toDict(self):
56
+ return {'type':'element', 'operator': self._operator.value, 'operands': [item.toDict() for item in self._operands]}