epmwebapi 6.0.40__tar.gz → 6.50.41__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 (98) hide show
  1. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/PKG-INFO +15 -5
  2. epmwebapi-6.50.41/epmwebapi/_version.py +1 -0
  3. epmwebapi-6.50.41/epmwebapi/advancedevent.py +58 -0
  4. epmwebapi-6.50.41/epmwebapi/attributeoperand.py +18 -0
  5. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/authorizationservice.py +1 -1
  6. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/basicvariable.py +6 -0
  7. epmwebapi-6.50.41/epmwebapi/elementoperand.py +56 -0
  8. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/epmconnection.py +581 -78
  9. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/epmmodelobject.py +28 -0
  10. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/epmnodeids.py +4 -0
  11. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/epmobject.py +8 -0
  12. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/epmvariable.py +19 -9
  13. epmwebapi-6.50.41/epmwebapi/eventfiltermodel.py +24 -0
  14. epmwebapi-6.50.41/epmwebapi/filtermodel.py +20 -0
  15. epmwebapi-6.50.41/epmwebapi/filteroperand.py +2 -0
  16. epmwebapi-6.50.41/epmwebapi/historyeventmodeljson.py +24 -0
  17. epmwebapi-6.50.41/epmwebapi/literaloperand.py +18 -0
  18. epmwebapi-6.50.41/epmwebapi/numpyextras.py +290 -0
  19. epmwebapi-6.50.41/epmwebapi/queryfiltercontent.py +15 -0
  20. epmwebapi-6.50.41/epmwebapi/queryfilterelement.py +17 -0
  21. epmwebapi-6.50.41/epmwebapi/querymodelfilterJSON.py +27 -0
  22. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/queryresultmask.py +2 -0
  23. epmwebapi-6.50.41/epmwebapi/simpleattributeoperand.py +17 -0
  24. epmwebapi-6.50.41/epmwebapi/typeevent.py +69 -0
  25. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi.egg-info/PKG-INFO +15 -5
  26. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi.egg-info/SOURCES.txt +15 -1
  27. epmwebapi-6.50.41/pyproject.toml +22 -0
  28. epmwebapi-6.50.41/setup.cfg +4 -0
  29. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/setup.py +1 -1
  30. epmwebapi-6.0.40/epmwebapi/_version.py +0 -1
  31. epmwebapi-6.0.40/epmwebapi/numpyextras.py +0 -125
  32. epmwebapi-6.0.40/setup.cfg +0 -8
  33. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/LICENSE.txt +0 -0
  34. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/Readme.md +0 -0
  35. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/__init__.py +0 -0
  36. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/aggregatedetails.py +0 -0
  37. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/annotationvaluejson.py +0 -0
  38. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/autostarttimer.py +0 -0
  39. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/basicvariablepropertymask.py +0 -0
  40. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/browsedirection.py +0 -0
  41. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/browseitemmodeljson.py +0 -0
  42. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/browsemodeljson.py +0 -0
  43. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/browseresultitemmodeljson.py +0 -0
  44. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/browseresultmodeljson.py +0 -0
  45. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/customtypedefinition.py +0 -0
  46. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/dataobjectattributes.py +0 -0
  47. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/dataobjectsfilter.py +0 -0
  48. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/datasetconfig.py +0 -0
  49. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/datasetpen.py +0 -0
  50. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/datavaluejson.py +0 -0
  51. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/diagnosticmodeljson.py +0 -0
  52. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/dll_references/Elipse.Epm.AddressSpaceModel.dll +0 -0
  53. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/dll_references/ElipseLoggerInterface.dll +0 -0
  54. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/dll_references/EpmData.dll +0 -0
  55. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/dll_references/Microsoft.Extensions.Logging.Abstractions.dll +0 -0
  56. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/domainfilter.py +0 -0
  57. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/downloadtype.py +0 -0
  58. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/epmconnectioncontext.py +0 -0
  59. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/epmdataobject.py +0 -0
  60. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/epmproperty.py +0 -0
  61. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/epmsession.py +0 -0
  62. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/epmutils.py +0 -0
  63. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/epmwebapi.py +0 -0
  64. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/exporttype.py +0 -0
  65. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/folder.py +0 -0
  66. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/historyprocessedmodeljson.py +0 -0
  67. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/historyrawmodeljson.py +0 -0
  68. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/historyresultitemmodeljson.py +0 -0
  69. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/historyresultmodeljson.py +0 -0
  70. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/historyupdatedataitemmodeljson.py +0 -0
  71. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/historyupdatedatamodeljson.py +0 -0
  72. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/historyupdateresultmodeljson.py +0 -0
  73. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/historyupdatetype.py +0 -0
  74. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/itempathandcontinuationpointjson.py +0 -0
  75. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/itempathjson.py +0 -0
  76. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/mimetype.py +0 -0
  77. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/nodeattributes.py +0 -0
  78. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/nodeclassmask.py +0 -0
  79. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/performupdatetype.py +0 -0
  80. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/portalresources.py +0 -0
  81. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/processorresources.py +0 -0
  82. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/querymodeljson.py +0 -0
  83. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/queryperiod.py +0 -0
  84. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/queryresultitemmodeljson.py +0 -0
  85. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/queryresultmodeljson.py +0 -0
  86. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/readitemmodeljson.py +0 -0
  87. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/readmodeljson.py +0 -0
  88. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/readresultitemmodeljson.py +0 -0
  89. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/readresultmodeljson.py +0 -0
  90. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/report.py +0 -0
  91. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/resource.py +0 -0
  92. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/resourcesmanager.py +0 -0
  93. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/statuscodes.py +0 -0
  94. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/writeitemmodeljson.py +0 -0
  95. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi/writemodeljson.py +0 -0
  96. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi.egg-info/dependency_links.txt +0 -0
  97. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi.egg-info/requires.txt +0 -0
  98. {epmwebapi-6.0.40 → epmwebapi-6.50.41}/epmwebapi.egg-info/top_level.txt +0 -0
@@ -1,17 +1,27 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: epmwebapi
3
- Version: 6.0.40
3
+ Version: 6.50.41
4
4
  Home-page: https://github.com/elipsesoftware/epmwebapi
5
5
  Author: Elipse Software Ltda
6
+ License-Expression: GPL-3.0-only
6
7
  Classifier: Development Status :: 3 - Alpha
7
8
  Classifier: Intended Audience :: Developers
8
9
  Classifier: Topic :: Software Development :: Build Tools
9
- Classifier: License :: OSI Approved :: MIT License
10
- Classifier: Programming Language :: Python :: 3.6
11
- Classifier: Programming Language :: Python :: 3.7
10
+ Classifier: Programming Language :: Python :: 3.10
11
+ Classifier: Programming Language :: Python :: 3.11
12
+ Classifier: Programming Language :: Python :: 3.12
12
13
  Requires-Python: >=3.6, <4
13
14
  Description-Content-Type: text/markdown
14
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
15
25
 
16
26
  # epmwebapi
17
27
 
@@ -0,0 +1 @@
1
+ __version__ = '6.50.41'
@@ -0,0 +1,58 @@
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 Advanced Event.
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 apply. 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
+ + Retrieves 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 in which `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
+ return self._connection._historyReadEvent(queryPeriod, self._eventPath, select, where)
@@ -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]}