epmwebapi 5.0.44__tar.gz → 6.0.39__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.
- epmwebapi-6.0.39/PKG-INFO +65 -0
- epmwebapi-6.0.39/epmwebapi/_version.py +1 -0
- epmwebapi-6.0.39/epmwebapi/autostarttimer.py +26 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/datavaluejson.py +28 -3
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/epmconnection.py +32 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/epmmodelobject.py +18 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/epmutils.py +1 -1
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/epmvariable.py +0 -1
- epmwebapi-6.0.39/epmwebapi/exporttype.py +15 -0
- epmwebapi-6.0.39/epmwebapi/report.py +29 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/resourcesmanager.py +88 -1
- epmwebapi-6.0.39/epmwebapi.egg-info/PKG-INFO +65 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi.egg-info/SOURCES.txt +2 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/setup.py +1 -1
- epmwebapi-5.0.44/PKG-INFO +0 -63
- epmwebapi-5.0.44/epmwebapi/_version.py +0 -1
- epmwebapi-5.0.44/epmwebapi/autostarttimer.py +0 -19
- epmwebapi-5.0.44/epmwebapi.egg-info/PKG-INFO +0 -63
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/LICENSE.txt +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/Readme.md +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/__init__.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/aggregatedetails.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/annotationvaluejson.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/authorizationservice.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/basicvariable.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/basicvariablepropertymask.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/browsedirection.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/browseitemmodeljson.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/browsemodeljson.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/browseresultitemmodeljson.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/browseresultmodeljson.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/customtypedefinition.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/dataobjectattributes.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/dataobjectsfilter.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/datasetconfig.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/datasetpen.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/diagnosticmodeljson.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/dll_references/Elipse.Epm.AddressSpaceModel.dll +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/dll_references/ElipseLoggerInterface.dll +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/dll_references/EpmData.dll +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/dll_references/Microsoft.Extensions.Logging.Abstractions.dll +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/domainfilter.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/downloadtype.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/epmconnectioncontext.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/epmdataobject.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/epmnodeids.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/epmobject.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/epmproperty.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/epmsession.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/epmwebapi.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/folder.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/historyprocessedmodeljson.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/historyrawmodeljson.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/historyresultitemmodeljson.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/historyresultmodeljson.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/historyupdatedataitemmodeljson.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/historyupdatedatamodeljson.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/historyupdateresultmodeljson.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/historyupdatetype.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/itempathandcontinuationpointjson.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/itempathjson.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/mimetype.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/nodeattributes.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/nodeclassmask.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/numpyextras.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/performupdatetype.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/portalresources.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/processorresources.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/querymodeljson.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/queryperiod.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/queryresultitemmodeljson.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/queryresultmask.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/queryresultmodeljson.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/readitemmodeljson.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/readmodeljson.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/readresultitemmodeljson.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/readresultmodeljson.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/resource.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/statuscodes.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/writeitemmodeljson.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/writemodeljson.py +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi.egg-info/dependency_links.txt +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi.egg-info/requires.txt +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi.egg-info/top_level.txt +0 -0
- {epmwebapi-5.0.44 → epmwebapi-6.0.39}/setup.cfg +0 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: epmwebapi
|
|
3
|
+
Version: 6.0.39
|
|
4
|
+
Summary: UNKNOWN
|
|
5
|
+
Home-page: https://github.com/elipsesoftware/epmwebapi
|
|
6
|
+
Author: Elipse Software Ltda
|
|
7
|
+
License: UNKNOWN
|
|
8
|
+
Description: # epmwebapi
|
|
9
|
+
|
|
10
|
+
A biblioteca **Epmwebapi** desenvolvida pela **Elipse Software**, permite a interação com os dados da sua plataforma
|
|
11
|
+
**Elipse Plant Manager(EPM)**. Possibilitando flexibilidade para buscar, organizar, analisar, compartilhar e monitorar os dados de processo industrial.
|
|
12
|
+
|
|
13
|
+
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.
|
|
14
|
+
|
|
15
|
+
Mais informações sobre o **EPM** podem ser encontradas no site https://www.elipse.com.br/produto/elipse-plant-manager/
|
|
16
|
+
|
|
17
|
+
**Requisitos:**
|
|
18
|
+
* EPM Webserver 3.06 (para acesso aos dados do EPM Server, não precisa estar instalado na mesma máquina da epmwebapi).
|
|
19
|
+
* Python 3.6 x64 ou superior
|
|
20
|
+
|
|
21
|
+
**Instalação:**
|
|
22
|
+
|
|
23
|
+
Online(Recomendado):
|
|
24
|
+
* 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.
|
|
25
|
+
|
|
26
|
+
Offline:
|
|
27
|
+
* Faça do download do pacote através do site da [Elipse](https://www.elipse.com.br/downloads).
|
|
28
|
+
* Faça a descompactação da pasta **epmwebapi** e copie para o diretório **site-packages** da instalação do Python.
|
|
29
|
+
* Instale as dependências: Bibliotecas Numpy, Requests e Python-dateutil.
|
|
30
|
+
|
|
31
|
+
**Exemplos:**
|
|
32
|
+
|
|
33
|
+
* [Exemplo básico](https://github.com/elipsesoftware/epmwebapi/blob/master/exemplos/Quickstart.ipynb) - Exemplos de leituras e escritas de dados e anotações.
|
|
34
|
+
* [Matplotlib](https://github.com/elipsesoftware/epmwebapi/blob/master/exemplos/basic_use_matplotlib.ipynb) - Utilizando essa biblioteca para gerar gráficos.
|
|
35
|
+
* [Pandas](https://github.com/elipsesoftware/epmwebapi/blob/master/exemplos/basic_use_pandas.ipynb) - Use Pandas para manipular dados tabulares.
|
|
36
|
+
* [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.
|
|
37
|
+
* [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.
|
|
38
|
+
* [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.
|
|
39
|
+
* [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.
|
|
40
|
+
* [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.
|
|
41
|
+
* [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.
|
|
42
|
+
* [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.
|
|
43
|
+
* [Criando mapas](https://github.com/elipsesoftware/epmwebapi/blob/master/exemplos/maps.ipynb) - Trabalhando com dados de geolocalização e mapas interativos.
|
|
44
|
+
* [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.
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
Platform: UNKNOWN
|
|
58
|
+
Classifier: Development Status :: 3 - Alpha
|
|
59
|
+
Classifier: Intended Audience :: Developers
|
|
60
|
+
Classifier: Topic :: Software Development :: Build Tools
|
|
61
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
62
|
+
Classifier: Programming Language :: Python :: 3.6
|
|
63
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
64
|
+
Requires-Python: >=3.6, <4
|
|
65
|
+
Description-Content-Type: text/markdown
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = '6.0.39'
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
from threading import Timer, Thread, Event
|
|
2
|
+
|
|
3
|
+
class AutoStartTimer(object):
|
|
4
|
+
def __init__(self, spam, callback):
|
|
5
|
+
self._spam = spam
|
|
6
|
+
self._callback = callback
|
|
7
|
+
self._stopEvent = Event()
|
|
8
|
+
self._thread = Thread(target=self._periodicalExecution)
|
|
9
|
+
self._thread.daemon = True
|
|
10
|
+
self._thread.start()
|
|
11
|
+
|
|
12
|
+
def _periodicalExecution(self):
|
|
13
|
+
while not self._stopEvent.is_set():
|
|
14
|
+
if not self._stopEvent.wait(self._spam):
|
|
15
|
+
self._callback()
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def start(self):
|
|
19
|
+
self.cancel()
|
|
20
|
+
self._thread = Thread(target=self._periodicalExecution)
|
|
21
|
+
self._thread.daemon = True
|
|
22
|
+
self._thread.start()
|
|
23
|
+
|
|
24
|
+
def cancel(self):
|
|
25
|
+
self._stopEvent.set()
|
|
26
|
+
self._thread.join()
|
|
@@ -8,7 +8,7 @@ class DataValueJSON(object):
|
|
|
8
8
|
"""
|
|
9
9
|
Class representing a DataValue.
|
|
10
10
|
"""
|
|
11
|
-
def __init__(self, value, statusCode, timestamp, dataTypeId=None):
|
|
11
|
+
def __init__(self, value, statusCode, timestamp, serverTimestamp = None, dataTypeId=None):
|
|
12
12
|
"""
|
|
13
13
|
Creates a new DataValue.
|
|
14
14
|
|
|
@@ -18,11 +18,14 @@ class DataValueJSON(object):
|
|
|
18
18
|
:type statusCode: int
|
|
19
19
|
:param timestamp: Timestamp of this DataValue.
|
|
20
20
|
:type timestamp: datetime.datetime
|
|
21
|
+
:param serverTimestamp: ServerTimestamp of this DataValue.
|
|
22
|
+
:type serverTimestamp: datetime.datetime
|
|
21
23
|
:param dataTypeId: ID of data type. Default is None.
|
|
22
24
|
:type dataTypeId: object
|
|
23
25
|
"""
|
|
24
26
|
self._value = value
|
|
25
27
|
self._statusCode = statusCode
|
|
28
|
+
|
|
26
29
|
if type(timestamp) == str:
|
|
27
30
|
try:
|
|
28
31
|
self._timestamp = dateutil.parser.parse(timestamp).astimezone(timezone.utc)
|
|
@@ -30,6 +33,15 @@ class DataValueJSON(object):
|
|
|
30
33
|
self._timestamp = datetime.datetime(1,1,1,0,0,tzinfo=datetime.timezone.utc)
|
|
31
34
|
else:
|
|
32
35
|
self._timestamp = timestamp
|
|
36
|
+
|
|
37
|
+
if type(serverTimestamp) == str:
|
|
38
|
+
try:
|
|
39
|
+
self._serverTimestamp = dateutil.parser.parse(serverTimestamp).astimezone(timezone.utc)
|
|
40
|
+
except OverflowError as error:
|
|
41
|
+
self._serverTimestamp = datetime.datetime(1,1,1,0,0,tzinfo=datetime.timezone.utc)
|
|
42
|
+
else:
|
|
43
|
+
self._serverTimestamp = serverTimestamp
|
|
44
|
+
|
|
33
45
|
self._dataTypeId = dataTypeId
|
|
34
46
|
|
|
35
47
|
@property
|
|
@@ -62,6 +74,16 @@ class DataValueJSON(object):
|
|
|
62
74
|
"""
|
|
63
75
|
return self._timestamp
|
|
64
76
|
|
|
77
|
+
@property
|
|
78
|
+
def serverTimestamp(self) -> datetime.datetime:
|
|
79
|
+
"""
|
|
80
|
+
Returns the server timestamp from this DataValue.
|
|
81
|
+
|
|
82
|
+
:return: A `datetime.datetime` value representing a source timestamp.
|
|
83
|
+
:rtype: datetime.datetime
|
|
84
|
+
"""
|
|
85
|
+
return self._serverTimestamp
|
|
86
|
+
|
|
65
87
|
def toDict(self):
|
|
66
88
|
"""
|
|
67
89
|
Returns this `DataValueJSON` object as a dictionary.
|
|
@@ -72,7 +94,10 @@ class DataValueJSON(object):
|
|
|
72
94
|
value = self._value.isoformat() if type(self._value) == datetime.datetime else self._value
|
|
73
95
|
if self._dataTypeId is None:
|
|
74
96
|
return {'value': value, 'quality': self._statusCode,
|
|
75
|
-
'timestamp' : self._timestamp.isoformat()
|
|
97
|
+
'timestamp' : self._timestamp.isoformat(),
|
|
98
|
+
'serverTimestamp' : self._serverTimestamp.isoformat() if self._serverTimestamp != None else None}
|
|
76
99
|
else:
|
|
77
100
|
return {'value': value, 'quality': self._statusCode,
|
|
78
|
-
'timestamp': self._timestamp.isoformat(),
|
|
101
|
+
'timestamp': self._timestamp.isoformat(),
|
|
102
|
+
'serverTimestamp' : self._serverTimestamp.isoformat() if self._serverTimestamp != None else None,
|
|
103
|
+
'dataTypeId': self._dataTypeId}
|
|
@@ -1064,6 +1064,37 @@ class EpmConnection(object):
|
|
|
1064
1064
|
|
|
1065
1065
|
return objs
|
|
1066
1066
|
|
|
1067
|
+
def _addReferencesEpmModel(self, path, obj):
|
|
1068
|
+
url = self._webApi + '/epm/v1/epmmodel/reference/' + path
|
|
1069
|
+
paths = []
|
|
1070
|
+
objs = {}
|
|
1071
|
+
|
|
1072
|
+
if type(obj) is not EpmObject and type(obj) is not EpmModelObject:
|
|
1073
|
+
raise BadArgumentException("obj must be an EpmObject type!")
|
|
1074
|
+
jsonRequest = {'itemPath': obj._itemPath.toDict()}
|
|
1075
|
+
|
|
1076
|
+
session = self._authorizationService.getEpmSession()
|
|
1077
|
+
response = session.post(url, json=jsonRequest, verify=False)
|
|
1078
|
+
|
|
1079
|
+
if response.status_code == 200:
|
|
1080
|
+
responseCode = response.json()['code']
|
|
1081
|
+
if responseCode != 0:
|
|
1082
|
+
if responseCode == 2153840640:
|
|
1083
|
+
raise InstanceNameDuplicatedException('Reference name duplicated')
|
|
1084
|
+
elif responseCode == 2154758144:
|
|
1085
|
+
raise InvalidObjectNameException('EPM Model object not found')
|
|
1086
|
+
elif responseCode == 2153512960:
|
|
1087
|
+
raise ObjectDependenciesException('Instance type creation not allowed')
|
|
1088
|
+
elif responseCode == 2158690304:
|
|
1089
|
+
raise InvalidObjectTypeException('Invalid type name')
|
|
1090
|
+
else:
|
|
1091
|
+
raise Exception(response.json()['message'])
|
|
1092
|
+
else:
|
|
1093
|
+
raise Exception("AddReferenceEpmModel call error + '" + str(response.status_code) + "'. Reason: " +
|
|
1094
|
+
response.reason + ". Text: " + response.text)
|
|
1095
|
+
|
|
1096
|
+
return True
|
|
1097
|
+
|
|
1067
1098
|
def _removeInstanceEpmModel(self, path):
|
|
1068
1099
|
url = self._webApi + '/epm/v1/epmmodel/' + path
|
|
1069
1100
|
|
|
@@ -1838,6 +1869,7 @@ class EpmConnection(object):
|
|
|
1838
1869
|
readItem = ReadResultItemModelJSON(item['identity'],
|
|
1839
1870
|
DataValueJSON(item['value']['value'], item['value']['quality'],
|
|
1840
1871
|
item['value']['timestamp'],
|
|
1872
|
+
item['value']['serverTimestamp'] if 'serverTimestamp' in item['value'] else None,
|
|
1841
1873
|
item['value']['dataTypeId'] if 'dataTypeId' in item['value'] else None))
|
|
1842
1874
|
else:
|
|
1843
1875
|
readItem = None
|
|
@@ -60,6 +60,24 @@ class EpmModelObject(EpmObject):
|
|
|
60
60
|
|
|
61
61
|
return self._epmConnection._addInstancesEpmModel(addPath, names, objTypes)
|
|
62
62
|
|
|
63
|
+
def addReference(self, obj:EpmObject) -> bool:
|
|
64
|
+
"""
|
|
65
|
+
Adds object reference to the current object.
|
|
66
|
+
|
|
67
|
+
:param obj: The object to be referenced.
|
|
68
|
+
:type obj: EpmObject
|
|
69
|
+
:return: True / False depending of the operation result.
|
|
70
|
+
:rtype: bool
|
|
71
|
+
"""
|
|
72
|
+
splitPath = self._path.split("/")
|
|
73
|
+
|
|
74
|
+
if splitPath[0] == "":
|
|
75
|
+
addPath = "/".join(splitPath[3:])
|
|
76
|
+
else:
|
|
77
|
+
addPath = "/".join(splitPath[2:])
|
|
78
|
+
|
|
79
|
+
return self._epmConnection._addReferencesEpmModel(addPath, obj)
|
|
80
|
+
|
|
63
81
|
def removeInstance(self, name:str):
|
|
64
82
|
"""
|
|
65
83
|
Removes a child object from this object.
|
|
@@ -10,7 +10,7 @@ class EpmUtils:
|
|
|
10
10
|
if isinstance(dataValuesCopy, DataValueJSON):
|
|
11
11
|
statusCode = dataValuesCopy.statusCode
|
|
12
12
|
opcUa = EpmUtils._statusCodeToOpcUa(statusCode)
|
|
13
|
-
dataValue = DataValueJSON(dataValuesCopy.value, opcUa, dataValuesCopy.timestamp)
|
|
13
|
+
dataValue = DataValueJSON(dataValuesCopy.value, opcUa, dataValuesCopy.timestamp, dataValuesCopy.serverTimestamp)
|
|
14
14
|
return dataValue
|
|
15
15
|
elif isinstance(dataValuesCopy, dict):
|
|
16
16
|
for numpyArray in dataValuesCopy.values():
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
from enum import Enum
|
|
2
|
+
|
|
3
|
+
class ExportType(Enum):
|
|
4
|
+
"""
|
|
5
|
+
An enumeration with all types of Export Type.
|
|
6
|
+
"""
|
|
7
|
+
Excel2003 = "Excel2003"
|
|
8
|
+
Excel = "Excel"
|
|
9
|
+
Word = "Word"
|
|
10
|
+
Pdf = "Pdf"
|
|
11
|
+
Csv = "Csv"
|
|
12
|
+
Json = "Json"
|
|
13
|
+
Xml = "Xml"
|
|
14
|
+
Tiff = "Tiff"
|
|
15
|
+
Mht = "Mht"
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import requests
|
|
2
|
+
import json
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
from typing import Dict, Any
|
|
6
|
+
from .resource import Resource
|
|
7
|
+
from .mimetype import Application
|
|
8
|
+
from .exporttype import ExportType
|
|
9
|
+
|
|
10
|
+
class Report(Resource):
|
|
11
|
+
"""
|
|
12
|
+
Class representing a Report (rdlx file) from **EPM Portal**'s or **EPM Processor**'s Resource Manager.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, resourcesManager, id, name, description):
|
|
16
|
+
super().__init__(resourcesManager, id, name, description, Application.OctetStream.value)
|
|
17
|
+
|
|
18
|
+
def export(self, type:ExportType, params:Dict[str, Any]) -> any:
|
|
19
|
+
"""
|
|
20
|
+
Exports a Report from Resources Manager to the specified type.
|
|
21
|
+
|
|
22
|
+
:param type: Type of Exportation. Possible values are `epmwebapi.downloadtype.ExportType.Excel2003`, `epmwebapi.downloadtype.ExportType.Excel`,
|
|
23
|
+
`epmwebapi.downloadtype.ExportType.Word`, `epmwebapi.downloadtype.ExportType.Pdf`, `epmwebapi.downloadtype.ExportType.Csv`, `epmwebapi.downloadtype.ExportType.Json`,
|
|
24
|
+
`epmwebapi.downloadtype.ExportType.Xml`, `epmwebapi.downloadtype.ExportType.Tiff`, `epmwebapi.downloadtype.ExportType.Mht`.
|
|
25
|
+
:type type: epmwebapi.exporttype
|
|
26
|
+
:return: Exported Report.
|
|
27
|
+
:rtype: any
|
|
28
|
+
"""
|
|
29
|
+
return self._resourcesManager._export(self._id, type, params)
|
|
@@ -2,13 +2,15 @@ import requests
|
|
|
2
2
|
import json
|
|
3
3
|
import collections
|
|
4
4
|
|
|
5
|
+
|
|
5
6
|
from .folder import Folder
|
|
6
7
|
from .resource import Resource
|
|
7
8
|
from .downloadtype import DownloadType
|
|
8
9
|
|
|
9
10
|
from .mimetype import Application, Text, Image, Audio, Video
|
|
11
|
+
from .exporttype import ExportType
|
|
10
12
|
|
|
11
|
-
from typing import Union, OrderedDict
|
|
13
|
+
from typing import Union, OrderedDict, Dict, Any
|
|
12
14
|
|
|
13
15
|
class ResourcesManager(object):
|
|
14
16
|
"""
|
|
@@ -73,6 +75,9 @@ class ResourcesManager(object):
|
|
|
73
75
|
|
|
74
76
|
if json_result['mimeType'] == Application.ElipsePortalFolder.value:
|
|
75
77
|
return Folder(self, json_result['identity'], json_result['name'], json_result['description'])
|
|
78
|
+
elif json_result['mimeType'] == Application.OctetStream.value and json_result['name'] is not None and json_result['name'].endswith('.rdlx'):
|
|
79
|
+
from .report import Report
|
|
80
|
+
return Report(self, json_result['identity'], json_result['name'], json_result['description'])
|
|
76
81
|
else:
|
|
77
82
|
return Resource(self, json_result['identity'], json_result['name'], json_result['description'], json_result['mimeType'])
|
|
78
83
|
|
|
@@ -99,6 +104,88 @@ class ResourcesManager(object):
|
|
|
99
104
|
|
|
100
105
|
return children
|
|
101
106
|
|
|
107
|
+
def _export(self, resourcePath, type:ExportType, params:Dict[str, Any]):
|
|
108
|
+
|
|
109
|
+
import os
|
|
110
|
+
resourcePath = os.path.normpath(resourcePath)
|
|
111
|
+
|
|
112
|
+
pathSplitted = resourcePath.split("\\")
|
|
113
|
+
|
|
114
|
+
pathSplitted.pop(0)
|
|
115
|
+
|
|
116
|
+
resourcePath = "/".join(pathSplitted)
|
|
117
|
+
|
|
118
|
+
import urllib
|
|
119
|
+
resourceId = urllib.parse.quote(resourcePath, safe='')
|
|
120
|
+
|
|
121
|
+
token = self._authorizationService.getToken()
|
|
122
|
+
|
|
123
|
+
header = {'Authorization': 'Bearer {}'.format(token)}
|
|
124
|
+
url = self._webApi + "/api/reporting/reports/" + resourceId + "/render"
|
|
125
|
+
render_data = {
|
|
126
|
+
"Parameters": params,
|
|
127
|
+
"Settings": {}
|
|
128
|
+
}
|
|
129
|
+
response = requests.post(url=url, headers=header, json=render_data)
|
|
130
|
+
if response.status_code != 200 and response.status_code != 202:
|
|
131
|
+
raise Exception(response.text)
|
|
132
|
+
|
|
133
|
+
url = self._webApi + "/api/reporting/session/" + response.json()["progress"]["documentId"] + "/export/"
|
|
134
|
+
html_data = {}
|
|
135
|
+
|
|
136
|
+
if type == ExportType.Mht:
|
|
137
|
+
url += "mht"
|
|
138
|
+
html_data = {"Settings": { "MhtOutput":True}}
|
|
139
|
+
elif type == ExportType.Json:
|
|
140
|
+
url += "json"
|
|
141
|
+
html_data = {"Settings": { "QuotePropertyNames":True}}
|
|
142
|
+
elif type == ExportType.Csv:
|
|
143
|
+
url += "csv"
|
|
144
|
+
elif type == ExportType.Excel:
|
|
145
|
+
url += "xlsx"
|
|
146
|
+
elif type == ExportType.Excel2003:
|
|
147
|
+
url += "xls"
|
|
148
|
+
elif type == ExportType.Pdf:
|
|
149
|
+
url += "pdf"
|
|
150
|
+
elif type == ExportType.Tiff:
|
|
151
|
+
url += "tiff"
|
|
152
|
+
elif type == ExportType.Word:
|
|
153
|
+
url += "docx"
|
|
154
|
+
elif type == ExportType.Xml:
|
|
155
|
+
url += "xml"
|
|
156
|
+
else:
|
|
157
|
+
raise Exception("Invalid ExportType provided!")
|
|
158
|
+
|
|
159
|
+
response = requests.post(url, headers=header, json=html_data)
|
|
160
|
+
if response.status_code != 200:
|
|
161
|
+
raise Exception(response.text)
|
|
162
|
+
|
|
163
|
+
exportId = response.json()["exportId"]
|
|
164
|
+
|
|
165
|
+
ready = False
|
|
166
|
+
url = self._webApi + "/api/reporting/reports/" + exportId + "/progress"
|
|
167
|
+
while not ready:
|
|
168
|
+
response = requests.get(url, headers=header)
|
|
169
|
+
if response.status_code != 200:
|
|
170
|
+
raise Exception(response.text)
|
|
171
|
+
ready = response.json()["completed"]
|
|
172
|
+
|
|
173
|
+
name, extension = os.path.splitext(resourceId)
|
|
174
|
+
|
|
175
|
+
url = self._webApi + "/api/reporting/export/" + exportId + "/" + name
|
|
176
|
+
response = requests.get(url, headers=header, stream=True)
|
|
177
|
+
if response.status_code != 200:
|
|
178
|
+
raise Exception(response.text)
|
|
179
|
+
|
|
180
|
+
if type == ExportType.Mht or type == ExportType.Xml or type == ExportType.Csv:
|
|
181
|
+
return response.content.decode('utf-8')
|
|
182
|
+
elif type == ExportType.Json:
|
|
183
|
+
return json.loads(response.content.decode('utf-8'))
|
|
184
|
+
elif type == ExportType.Excel or type == ExportType.Excel2003 or type == ExportType.Word or type == ExportType.Pdf or type == ExportType.Tiff:
|
|
185
|
+
return response.content
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
|
|
102
189
|
def _download(self, resourceId, type):
|
|
103
190
|
|
|
104
191
|
import urllib
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: epmwebapi
|
|
3
|
+
Version: 6.0.39
|
|
4
|
+
Summary: UNKNOWN
|
|
5
|
+
Home-page: https://github.com/elipsesoftware/epmwebapi
|
|
6
|
+
Author: Elipse Software Ltda
|
|
7
|
+
License: UNKNOWN
|
|
8
|
+
Description: # epmwebapi
|
|
9
|
+
|
|
10
|
+
A biblioteca **Epmwebapi** desenvolvida pela **Elipse Software**, permite a interação com os dados da sua plataforma
|
|
11
|
+
**Elipse Plant Manager(EPM)**. Possibilitando flexibilidade para buscar, organizar, analisar, compartilhar e monitorar os dados de processo industrial.
|
|
12
|
+
|
|
13
|
+
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.
|
|
14
|
+
|
|
15
|
+
Mais informações sobre o **EPM** podem ser encontradas no site https://www.elipse.com.br/produto/elipse-plant-manager/
|
|
16
|
+
|
|
17
|
+
**Requisitos:**
|
|
18
|
+
* EPM Webserver 3.06 (para acesso aos dados do EPM Server, não precisa estar instalado na mesma máquina da epmwebapi).
|
|
19
|
+
* Python 3.6 x64 ou superior
|
|
20
|
+
|
|
21
|
+
**Instalação:**
|
|
22
|
+
|
|
23
|
+
Online(Recomendado):
|
|
24
|
+
* 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.
|
|
25
|
+
|
|
26
|
+
Offline:
|
|
27
|
+
* Faça do download do pacote através do site da [Elipse](https://www.elipse.com.br/downloads).
|
|
28
|
+
* Faça a descompactação da pasta **epmwebapi** e copie para o diretório **site-packages** da instalação do Python.
|
|
29
|
+
* Instale as dependências: Bibliotecas Numpy, Requests e Python-dateutil.
|
|
30
|
+
|
|
31
|
+
**Exemplos:**
|
|
32
|
+
|
|
33
|
+
* [Exemplo básico](https://github.com/elipsesoftware/epmwebapi/blob/master/exemplos/Quickstart.ipynb) - Exemplos de leituras e escritas de dados e anotações.
|
|
34
|
+
* [Matplotlib](https://github.com/elipsesoftware/epmwebapi/blob/master/exemplos/basic_use_matplotlib.ipynb) - Utilizando essa biblioteca para gerar gráficos.
|
|
35
|
+
* [Pandas](https://github.com/elipsesoftware/epmwebapi/blob/master/exemplos/basic_use_pandas.ipynb) - Use Pandas para manipular dados tabulares.
|
|
36
|
+
* [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.
|
|
37
|
+
* [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.
|
|
38
|
+
* [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.
|
|
39
|
+
* [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.
|
|
40
|
+
* [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.
|
|
41
|
+
* [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.
|
|
42
|
+
* [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.
|
|
43
|
+
* [Criando mapas](https://github.com/elipsesoftware/epmwebapi/blob/master/exemplos/maps.ipynb) - Trabalhando com dados de geolocalização e mapas interativos.
|
|
44
|
+
* [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.
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
Platform: UNKNOWN
|
|
58
|
+
Classifier: Development Status :: 3 - Alpha
|
|
59
|
+
Classifier: Intended Audience :: Developers
|
|
60
|
+
Classifier: Topic :: Software Development :: Build Tools
|
|
61
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
62
|
+
Classifier: Programming Language :: Python :: 3.6
|
|
63
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
64
|
+
Requires-Python: >=3.6, <4
|
|
65
|
+
Description-Content-Type: text/markdown
|
|
@@ -35,6 +35,7 @@ epmwebapi/epmsession.py
|
|
|
35
35
|
epmwebapi/epmutils.py
|
|
36
36
|
epmwebapi/epmvariable.py
|
|
37
37
|
epmwebapi/epmwebapi.py
|
|
38
|
+
epmwebapi/exporttype.py
|
|
38
39
|
epmwebapi/folder.py
|
|
39
40
|
epmwebapi/historyprocessedmodeljson.py
|
|
40
41
|
epmwebapi/historyrawmodeljson.py
|
|
@@ -62,6 +63,7 @@ epmwebapi/readitemmodeljson.py
|
|
|
62
63
|
epmwebapi/readmodeljson.py
|
|
63
64
|
epmwebapi/readresultitemmodeljson.py
|
|
64
65
|
epmwebapi/readresultmodeljson.py
|
|
66
|
+
epmwebapi/report.py
|
|
65
67
|
epmwebapi/resource.py
|
|
66
68
|
epmwebapi/resourcesmanager.py
|
|
67
69
|
epmwebapi/statuscodes.py
|
|
@@ -7,7 +7,7 @@ with open(path.join(this_directory, 'Readme.md'), encoding='utf-8') as f:
|
|
|
7
7
|
long_description = f.read()
|
|
8
8
|
|
|
9
9
|
setup(name = 'epmwebapi',
|
|
10
|
-
version = '
|
|
10
|
+
version = '6.0.39',
|
|
11
11
|
author = 'Elipse Software Ltda',
|
|
12
12
|
packages = ['epmwebapi'],
|
|
13
13
|
include_package_data=True,
|
epmwebapi-5.0.44/PKG-INFO
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: epmwebapi
|
|
3
|
-
Version: 5.0.44
|
|
4
|
-
Home-page: https://github.com/elipsesoftware/epmwebapi
|
|
5
|
-
Author: Elipse Software Ltda
|
|
6
|
-
Classifier: Development Status :: 3 - Alpha
|
|
7
|
-
Classifier: Intended Audience :: Developers
|
|
8
|
-
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
|
|
12
|
-
Requires-Python: >=3.6, <4
|
|
13
|
-
Description-Content-Type: text/markdown
|
|
14
|
-
License-File: LICENSE.txt
|
|
15
|
-
|
|
16
|
-
# epmwebapi
|
|
17
|
-
|
|
18
|
-
A biblioteca **Epmwebapi** desenvolvida pela **Elipse Software**, permite a interação com os dados da sua plataforma
|
|
19
|
-
**Elipse Plant Manager(EPM)**. Possibilitando flexibilidade para buscar, organizar, analisar, compartilhar e monitorar os dados de processo industrial.
|
|
20
|
-
|
|
21
|
-
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.
|
|
22
|
-
|
|
23
|
-
Mais informações sobre o **EPM** podem ser encontradas no site https://www.elipse.com.br/produto/elipse-plant-manager/
|
|
24
|
-
|
|
25
|
-
**Requisitos:**
|
|
26
|
-
* EPM Webserver 3.06 (para acesso aos dados do EPM Server, não precisa estar instalado na mesma máquina da epmwebapi).
|
|
27
|
-
* Python 3.6 x64 ou superior
|
|
28
|
-
|
|
29
|
-
**Instalação:**
|
|
30
|
-
|
|
31
|
-
Online(Recomendado):
|
|
32
|
-
* 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.
|
|
33
|
-
|
|
34
|
-
Offline:
|
|
35
|
-
* Faça do download do pacote através do site da [Elipse](https://www.elipse.com.br/downloads).
|
|
36
|
-
* Faça a descompactação da pasta **epmwebapi** e copie para o diretório **site-packages** da instalação do Python.
|
|
37
|
-
* Instale as dependências: Bibliotecas Numpy, Requests e Python-dateutil.
|
|
38
|
-
|
|
39
|
-
**Exemplos:**
|
|
40
|
-
|
|
41
|
-
* [Exemplo básico](https://github.com/elipsesoftware/epmwebapi/blob/master/exemplos/Quickstart.ipynb) - Exemplos de leituras e escritas de dados e anotações.
|
|
42
|
-
* [Matplotlib](https://github.com/elipsesoftware/epmwebapi/blob/master/exemplos/basic_use_matplotlib.ipynb) - Utilizando essa biblioteca para gerar gráficos.
|
|
43
|
-
* [Pandas](https://github.com/elipsesoftware/epmwebapi/blob/master/exemplos/basic_use_pandas.ipynb) - Use Pandas para manipular dados tabulares.
|
|
44
|
-
* [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.
|
|
45
|
-
* [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.
|
|
46
|
-
* [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.
|
|
47
|
-
* [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.
|
|
48
|
-
* [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.
|
|
49
|
-
* [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.
|
|
50
|
-
* [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.
|
|
51
|
-
* [Criando mapas](https://github.com/elipsesoftware/epmwebapi/blob/master/exemplos/maps.ipynb) - Trabalhando com dados de geolocalização e mapas interativos.
|
|
52
|
-
* [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.
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = '5.0.44'
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
from threading import Timer, Thread, Event
|
|
2
|
-
|
|
3
|
-
class AutoStartTimer(object):
|
|
4
|
-
def __init__(self, spam, callback):
|
|
5
|
-
self._spam = spam
|
|
6
|
-
self._callback = callback
|
|
7
|
-
self._thread = Timer(self._spam, self.callback)
|
|
8
|
-
self._thread.start()
|
|
9
|
-
|
|
10
|
-
def callback(self):
|
|
11
|
-
self._callback()
|
|
12
|
-
self._thread = Timer(self._spam, self.callback)
|
|
13
|
-
self._thread.start()
|
|
14
|
-
|
|
15
|
-
def start(self):
|
|
16
|
-
self._thread.start()
|
|
17
|
-
|
|
18
|
-
def cancel(self):
|
|
19
|
-
self._thread.cancel()
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: epmwebapi
|
|
3
|
-
Version: 5.0.44
|
|
4
|
-
Home-page: https://github.com/elipsesoftware/epmwebapi
|
|
5
|
-
Author: Elipse Software Ltda
|
|
6
|
-
Classifier: Development Status :: 3 - Alpha
|
|
7
|
-
Classifier: Intended Audience :: Developers
|
|
8
|
-
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
|
|
12
|
-
Requires-Python: >=3.6, <4
|
|
13
|
-
Description-Content-Type: text/markdown
|
|
14
|
-
License-File: LICENSE.txt
|
|
15
|
-
|
|
16
|
-
# epmwebapi
|
|
17
|
-
|
|
18
|
-
A biblioteca **Epmwebapi** desenvolvida pela **Elipse Software**, permite a interação com os dados da sua plataforma
|
|
19
|
-
**Elipse Plant Manager(EPM)**. Possibilitando flexibilidade para buscar, organizar, analisar, compartilhar e monitorar os dados de processo industrial.
|
|
20
|
-
|
|
21
|
-
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.
|
|
22
|
-
|
|
23
|
-
Mais informações sobre o **EPM** podem ser encontradas no site https://www.elipse.com.br/produto/elipse-plant-manager/
|
|
24
|
-
|
|
25
|
-
**Requisitos:**
|
|
26
|
-
* EPM Webserver 3.06 (para acesso aos dados do EPM Server, não precisa estar instalado na mesma máquina da epmwebapi).
|
|
27
|
-
* Python 3.6 x64 ou superior
|
|
28
|
-
|
|
29
|
-
**Instalação:**
|
|
30
|
-
|
|
31
|
-
Online(Recomendado):
|
|
32
|
-
* 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.
|
|
33
|
-
|
|
34
|
-
Offline:
|
|
35
|
-
* Faça do download do pacote através do site da [Elipse](https://www.elipse.com.br/downloads).
|
|
36
|
-
* Faça a descompactação da pasta **epmwebapi** e copie para o diretório **site-packages** da instalação do Python.
|
|
37
|
-
* Instale as dependências: Bibliotecas Numpy, Requests e Python-dateutil.
|
|
38
|
-
|
|
39
|
-
**Exemplos:**
|
|
40
|
-
|
|
41
|
-
* [Exemplo básico](https://github.com/elipsesoftware/epmwebapi/blob/master/exemplos/Quickstart.ipynb) - Exemplos de leituras e escritas de dados e anotações.
|
|
42
|
-
* [Matplotlib](https://github.com/elipsesoftware/epmwebapi/blob/master/exemplos/basic_use_matplotlib.ipynb) - Utilizando essa biblioteca para gerar gráficos.
|
|
43
|
-
* [Pandas](https://github.com/elipsesoftware/epmwebapi/blob/master/exemplos/basic_use_pandas.ipynb) - Use Pandas para manipular dados tabulares.
|
|
44
|
-
* [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.
|
|
45
|
-
* [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.
|
|
46
|
-
* [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.
|
|
47
|
-
* [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.
|
|
48
|
-
* [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.
|
|
49
|
-
* [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.
|
|
50
|
-
* [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.
|
|
51
|
-
* [Criando mapas](https://github.com/elipsesoftware/epmwebapi/blob/master/exemplos/maps.ipynb) - Trabalhando com dados de geolocalização e mapas interativos.
|
|
52
|
-
* [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.
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{epmwebapi-5.0.44 → epmwebapi-6.0.39}/epmwebapi/dll_references/Elipse.Epm.AddressSpaceModel.dll
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|