tagreader 5.1.2__tar.gz → 5.2.0__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.
- {tagreader-5.1.2 → tagreader-5.2.0}/LICENSE +21 -21
- {tagreader-5.1.2 → tagreader-5.2.0}/PKG-INFO +4 -1
- {tagreader-5.1.2 → tagreader-5.2.0}/README.md +59 -59
- {tagreader-5.1.2 → tagreader-5.2.0}/pyproject.toml +53 -50
- {tagreader-5.1.2 → tagreader-5.2.0}/tagreader/__init__.py +14 -14
- {tagreader-5.1.2 → tagreader-5.2.0}/tagreader/__version__.py +7 -7
- {tagreader-5.1.2 → tagreader-5.2.0}/tagreader/cache.py +368 -368
- {tagreader-5.1.2 → tagreader-5.2.0}/tagreader/clients.py +621 -618
- {tagreader-5.1.2 → tagreader-5.2.0}/tagreader/logger.py +10 -10
- {tagreader-5.1.2 → tagreader-5.2.0}/tagreader/utils.py +284 -283
- {tagreader-5.1.2 → tagreader-5.2.0}/tagreader/web_handlers.py +1065 -995
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2020 Equinor
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 Equinor
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: tagreader
|
|
3
|
-
Version: 5.
|
|
3
|
+
Version: 5.2.0
|
|
4
4
|
Summary: Tagreader is a Python package for reading trend data from the OSIsoft PI and Aspen Infoplus.21 IMS systems.
|
|
5
5
|
Home-page: https://github.com/equinor/tagreader-python
|
|
6
6
|
License: MIT
|
|
@@ -29,10 +29,13 @@ Provides-Extra: notebooks
|
|
|
29
29
|
Requires-Dist: certifi (>=2023.7.22,<2024.0.0)
|
|
30
30
|
Requires-Dist: diskcache (>=5.6.1,<6.0.0)
|
|
31
31
|
Requires-Dist: matplotlib (>=3,<4) ; extra == "notebooks"
|
|
32
|
+
Requires-Dist: msal-bearer (>=0.1.0,<0.2.0)
|
|
32
33
|
Requires-Dist: notebook (>=7.0.3,<8.0.0) ; extra == "notebooks"
|
|
33
34
|
Requires-Dist: pandas (>=1)
|
|
35
|
+
Requires-Dist: pycryptodome (>=3.20.0,<4.0.0)
|
|
34
36
|
Requires-Dist: requests (>=2,<3)
|
|
35
37
|
Requires-Dist: requests-kerberos (>=0,<1)
|
|
38
|
+
Requires-Dist: requests-ntlm (>=1.2.0,<2.0.0)
|
|
36
39
|
Project-URL: Repository, https://github.com/equinor/tagreader-python
|
|
37
40
|
Description-Content-Type: text/markdown
|
|
38
41
|
|
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
# tagreader-python <!-- omit in toc -->
|
|
2
|
-
|
|
3
|
-

|
|
4
|
-

|
|
5
|
-

|
|
6
|
-
[](https://pepy.tech/project/tagreader)
|
|
7
|
-
|
|
8
|
-
Tagreader is a Python package for reading timeseries data from the OSIsoft PI and Aspen Infoplus.21
|
|
9
|
-
Information Manufacturing Systems (IMS) systems. It is intended to be easy to use, and present as similar interfaces
|
|
10
|
-
as possible to the backend historians.
|
|
11
|
-
|
|
12
|
-
## Installation
|
|
13
|
-
You can install tagreader directly into your project from pypi by using pip
|
|
14
|
-
or another package manager. The only requirement is Python version 3.8 or above.
|
|
15
|
-
|
|
16
|
-
```shell"
|
|
17
|
-
pip install tagreader
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
The following are required and will be installed:
|
|
21
|
-
|
|
22
|
-
* pandas
|
|
23
|
-
* requests
|
|
24
|
-
* requests-kerberos
|
|
25
|
-
* certifi
|
|
26
|
-
* diskcache
|
|
27
|
-
|
|
28
|
-
## Usage
|
|
29
|
-
Tagreader easy to use for both Equinor internal IMS services, and non-internal usage. For non-internal usage
|
|
30
|
-
you simply need to provide the corresponding IMS service URLs and IMSType.
|
|
31
|
-
See [data source](https://equinor.github.io/tagreader-python/docs/about/usage/data-source) for details.
|
|
32
|
-
|
|
33
|
-
### Usage example
|
|
34
|
-
```python
|
|
35
|
-
import tagreader
|
|
36
|
-
c = tagreader.IMSClient("mysource", "aspenone")
|
|
37
|
-
print(c.search("tag*"))
|
|
38
|
-
df = c.read_tags(["tag1", "tag2"], "18.06.2020 08:00:00", "18.06.2020 09:00:00", 60)
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
Note, you can add a timeout argument to the search method in order to avoid long-running search queries.
|
|
42
|
-
|
|
43
|
-
### Jupyter Notebook Quickstart
|
|
44
|
-
Jupyter Notebook examples can be found in /examples. In order to run these examples, you need to install the
|
|
45
|
-
optional dependencies.
|
|
46
|
-
|
|
47
|
-
```shell
|
|
48
|
-
pip install tagreader[notebooks]
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
The quickstart Jupyter Notebook can be found [here](https://github.com/equinor/tagreader-python/blob/main/examples/quickstart.ipynb)
|
|
52
|
-
|
|
53
|
-
For more details, see the [Tagreader Docs](https://equinor.github.io/tagreader-python/).
|
|
54
|
-
|
|
55
|
-
## Documentation
|
|
56
|
-
The full documentation can be found in [Tagreader Docs](https://equinor.github.io/tagreader-python/)
|
|
57
|
-
|
|
58
|
-
## Contribute
|
|
59
|
-
To starting contributing, please see [Tagreader Docs - Contribute](https://equinor.github.io/tagreader-python/docs/contribute/overview)
|
|
1
|
+
# tagreader-python <!-- omit in toc -->
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+

|
|
5
|
+

|
|
6
|
+
[](https://pepy.tech/project/tagreader)
|
|
7
|
+
|
|
8
|
+
Tagreader is a Python package for reading timeseries data from the OSIsoft PI and Aspen Infoplus.21
|
|
9
|
+
Information Manufacturing Systems (IMS) systems. It is intended to be easy to use, and present as similar interfaces
|
|
10
|
+
as possible to the backend historians.
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
You can install tagreader directly into your project from pypi by using pip
|
|
14
|
+
or another package manager. The only requirement is Python version 3.8 or above.
|
|
15
|
+
|
|
16
|
+
```shell"
|
|
17
|
+
pip install tagreader
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
The following are required and will be installed:
|
|
21
|
+
|
|
22
|
+
* pandas
|
|
23
|
+
* requests
|
|
24
|
+
* requests-kerberos
|
|
25
|
+
* certifi
|
|
26
|
+
* diskcache
|
|
27
|
+
|
|
28
|
+
## Usage
|
|
29
|
+
Tagreader easy to use for both Equinor internal IMS services, and non-internal usage. For non-internal usage
|
|
30
|
+
you simply need to provide the corresponding IMS service URLs and IMSType.
|
|
31
|
+
See [data source](https://equinor.github.io/tagreader-python/docs/about/usage/data-source) for details.
|
|
32
|
+
|
|
33
|
+
### Usage example
|
|
34
|
+
```python
|
|
35
|
+
import tagreader
|
|
36
|
+
c = tagreader.IMSClient("mysource", "aspenone")
|
|
37
|
+
print(c.search("tag*"))
|
|
38
|
+
df = c.read_tags(["tag1", "tag2"], "18.06.2020 08:00:00", "18.06.2020 09:00:00", 60)
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Note, you can add a timeout argument to the search method in order to avoid long-running search queries.
|
|
42
|
+
|
|
43
|
+
### Jupyter Notebook Quickstart
|
|
44
|
+
Jupyter Notebook examples can be found in /examples. In order to run these examples, you need to install the
|
|
45
|
+
optional dependencies.
|
|
46
|
+
|
|
47
|
+
```shell
|
|
48
|
+
pip install tagreader[notebooks]
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
The quickstart Jupyter Notebook can be found [here](https://github.com/equinor/tagreader-python/blob/main/examples/quickstart.ipynb)
|
|
52
|
+
|
|
53
|
+
For more details, see the [Tagreader Docs](https://equinor.github.io/tagreader-python/).
|
|
54
|
+
|
|
55
|
+
## Documentation
|
|
56
|
+
The full documentation can be found in [Tagreader Docs](https://equinor.github.io/tagreader-python/)
|
|
57
|
+
|
|
58
|
+
## Contribute
|
|
59
|
+
To starting contributing, please see [Tagreader Docs - Contribute](https://equinor.github.io/tagreader-python/docs/contribute/overview)
|
|
@@ -1,50 +1,53 @@
|
|
|
1
|
-
[tool.poetry]
|
|
2
|
-
name = "tagreader"
|
|
3
|
-
version = "5.
|
|
4
|
-
description = "Tagreader is a Python package for reading trend data from the OSIsoft PI and Aspen Infoplus.21 IMS systems."
|
|
5
|
-
authors = ["Einar S. Idsø <eiids@equinor.com>", "Morten Dæhli Aslesen <masl@equinor.com"]
|
|
6
|
-
license = "MIT"
|
|
7
|
-
readme = "README.md"
|
|
8
|
-
packages = [{include = "tagreader"}]
|
|
9
|
-
keywords=["Aspen InfoPlus.21", "OSIsoft PI"]
|
|
10
|
-
homepage = "https://github.com/equinor/tagreader-python"
|
|
11
|
-
repository = "https://github.com/equinor/tagreader-python"
|
|
12
|
-
classifiers=[
|
|
13
|
-
"Development Status :: 5 - Production/Stable",
|
|
14
|
-
"Intended Audience :: Developers",
|
|
15
|
-
"Intended Audience :: Science/Research",
|
|
16
|
-
"License :: OSI Approved :: MIT License",
|
|
17
|
-
"Natural Language :: English",
|
|
18
|
-
"Operating System :: MacOS",
|
|
19
|
-
"Operating System :: Microsoft :: Windows",
|
|
20
|
-
"Operating System :: POSIX :: Linux",
|
|
21
|
-
"Programming Language :: Python :: 3.8",
|
|
22
|
-
"Programming Language :: Python :: 3.9",
|
|
23
|
-
"Programming Language :: Python :: 3.10",
|
|
24
|
-
"Programming Language :: Python :: 3.11",
|
|
25
|
-
"Topic :: Scientific/Engineering :: Interface Engine/Protocol Translator",
|
|
26
|
-
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
27
|
-
"Topic :: Utilities",
|
|
28
|
-
]
|
|
29
|
-
|
|
30
|
-
[tool.poetry.dependencies]
|
|
31
|
-
python = "^3.8"
|
|
32
|
-
pandas = ">=1"
|
|
33
|
-
certifi = "^2023.7.22"
|
|
34
|
-
requests = "^2"
|
|
35
|
-
requests-kerberos = "^0"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
[
|
|
49
|
-
|
|
50
|
-
|
|
1
|
+
[tool.poetry]
|
|
2
|
+
name = "tagreader"
|
|
3
|
+
version = "5.2.0"
|
|
4
|
+
description = "Tagreader is a Python package for reading trend data from the OSIsoft PI and Aspen Infoplus.21 IMS systems."
|
|
5
|
+
authors = ["Einar S. Idsø <eiids@equinor.com>", "Morten Dæhli Aslesen <masl@equinor.com"]
|
|
6
|
+
license = "MIT"
|
|
7
|
+
readme = "README.md"
|
|
8
|
+
packages = [{include = "tagreader"}]
|
|
9
|
+
keywords=["Aspen InfoPlus.21", "OSIsoft PI"]
|
|
10
|
+
homepage = "https://github.com/equinor/tagreader-python"
|
|
11
|
+
repository = "https://github.com/equinor/tagreader-python"
|
|
12
|
+
classifiers=[
|
|
13
|
+
"Development Status :: 5 - Production/Stable",
|
|
14
|
+
"Intended Audience :: Developers",
|
|
15
|
+
"Intended Audience :: Science/Research",
|
|
16
|
+
"License :: OSI Approved :: MIT License",
|
|
17
|
+
"Natural Language :: English",
|
|
18
|
+
"Operating System :: MacOS",
|
|
19
|
+
"Operating System :: Microsoft :: Windows",
|
|
20
|
+
"Operating System :: POSIX :: Linux",
|
|
21
|
+
"Programming Language :: Python :: 3.8",
|
|
22
|
+
"Programming Language :: Python :: 3.9",
|
|
23
|
+
"Programming Language :: Python :: 3.10",
|
|
24
|
+
"Programming Language :: Python :: 3.11",
|
|
25
|
+
"Topic :: Scientific/Engineering :: Interface Engine/Protocol Translator",
|
|
26
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
27
|
+
"Topic :: Utilities",
|
|
28
|
+
]
|
|
29
|
+
|
|
30
|
+
[tool.poetry.dependencies]
|
|
31
|
+
python = "^3.8"
|
|
32
|
+
pandas = ">=1"
|
|
33
|
+
certifi = "^2023.7.22"
|
|
34
|
+
requests = "^2"
|
|
35
|
+
requests-kerberos = "^0"
|
|
36
|
+
msal-bearer = "^0.1.0"
|
|
37
|
+
notebook = { version = "^7.0.3", optional = true }
|
|
38
|
+
matplotlib = { version = "^3", optional = true }
|
|
39
|
+
diskcache = "^5.6.1"
|
|
40
|
+
pycryptodome = "^3.20.0"
|
|
41
|
+
requests-ntlm = "^1.2.0"
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
[tool.poetry.group.dev.dependencies]
|
|
45
|
+
pre-commit = "^3"
|
|
46
|
+
pytest = "^7"
|
|
47
|
+
|
|
48
|
+
[tool.poetry.extras]
|
|
49
|
+
notebooks = ["notebook", "matplotlib"]
|
|
50
|
+
|
|
51
|
+
[build-system]
|
|
52
|
+
requires = ["poetry-core"]
|
|
53
|
+
build-backend = "poetry.core.masonry.api"
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
from tagreader.clients import IMSClient, list_sources
|
|
2
|
-
from tagreader.utils import (
|
|
3
|
-
IMSType,
|
|
4
|
-
ReaderType,
|
|
5
|
-
add_statoil_root_certificate,
|
|
6
|
-
is_equinor,
|
|
7
|
-
is_mac,
|
|
8
|
-
is_windows,
|
|
9
|
-
)
|
|
10
|
-
|
|
11
|
-
if is_equinor():
|
|
12
|
-
add_statoil_root_certificate()
|
|
13
|
-
|
|
14
|
-
from tagreader.__version__ import version as __version__
|
|
1
|
+
from tagreader.clients import IMSClient, list_sources
|
|
2
|
+
from tagreader.utils import (
|
|
3
|
+
IMSType,
|
|
4
|
+
ReaderType,
|
|
5
|
+
add_statoil_root_certificate,
|
|
6
|
+
is_equinor,
|
|
7
|
+
is_mac,
|
|
8
|
+
is_windows,
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
if is_equinor():
|
|
12
|
+
add_statoil_root_certificate()
|
|
13
|
+
|
|
14
|
+
from tagreader.__version__ import version as __version__
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
from importlib.metadata import PackageNotFoundError, distribution
|
|
2
|
-
|
|
3
|
-
try:
|
|
4
|
-
version = distribution("tagreader").version
|
|
5
|
-
except PackageNotFoundError:
|
|
6
|
-
# This will happen if you run tagreader without installing it as a package. E.g. poetry install --no-root.
|
|
7
|
-
version = "0.0.0"
|
|
1
|
+
from importlib.metadata import PackageNotFoundError, distribution
|
|
2
|
+
|
|
3
|
+
try:
|
|
4
|
+
version = distribution("tagreader").version
|
|
5
|
+
except PackageNotFoundError:
|
|
6
|
+
# This will happen if you run tagreader without installing it as a package. E.g. poetry install --no-root.
|
|
7
|
+
version = "0.0.0"
|