python-eigen-ingenuity-nocli 0.5.24b2__tar.gz → 0.5.25__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 (105) hide show
  1. {python_eigen_ingenuity_nocli-0.5.24b2/python_eigen_ingenuity_nocli.egg-info → python_eigen_ingenuity_nocli-0.5.25}/PKG-INFO +1 -1
  2. python_eigen_ingenuity_nocli-0.5.25/README.md +221 -0
  3. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/eigeningenuity/assetmodel.py +96 -76
  4. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/eigeningenuity/auth.py +4 -2
  5. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/eigeningenuity/commonmenu.py +82 -78
  6. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/eigeningenuity/elastic.py +20 -5
  7. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/eigeningenuity/events.py +91 -60
  8. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/eigeningenuity/historian.py +134 -28
  9. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/eigeningenuity/historianmulti.py +244 -152
  10. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/eigeningenuity/logformatter.py +46 -1
  11. python_eigen_ingenuity_nocli-0.5.25/eigeningenuity/settings.py +128 -0
  12. python_eigen_ingenuity_nocli-0.5.25/eigeningenuity/sql.py +184 -0
  13. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25/python_eigen_ingenuity_nocli.egg-info}/PKG-INFO +1 -1
  14. python_eigen_ingenuity_nocli-0.5.24b2/README.md +0 -870
  15. python_eigen_ingenuity_nocli-0.5.24b2/eigeningenuity/settings.py +0 -116
  16. python_eigen_ingenuity_nocli-0.5.24b2/eigeningenuity/sql.py +0 -132
  17. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/MANIFEST.in +0 -0
  18. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/README-nocli.md +0 -0
  19. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/eigeningenuity/__init__.py +0 -0
  20. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/eigeningenuity/core/__init__.py +0 -0
  21. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/eigeningenuity/util.py +0 -0
  22. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/local-tests/__init__.py +0 -0
  23. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/local-tests/common.py +0 -0
  24. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/local-tests/config.py +0 -0
  25. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/local-tests/demo.py +0 -0
  26. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/local-tests/historian/__init__.py +0 -0
  27. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/local-tests/historian/test_getCurrentDataPoints.py +0 -0
  28. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/local-tests/historian/test_getInterpolatedPoints.py +0 -0
  29. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/local-tests/historian/test_getInterpolatedRange.py +0 -0
  30. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/local-tests/historian/test_getMetaData.py +0 -0
  31. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/local-tests/historian/test_getRawDataPoints.py +0 -0
  32. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/local-tests/historian/test_listDataTags.py +0 -0
  33. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/local-tests/historian/test_writePoints.py +0 -0
  34. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/local-tests/historianmulti/__init__.py +0 -0
  35. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/local-tests/historianmulti/common_multi.py +0 -0
  36. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/local-tests/historianmulti/test_getClosestRawPoint.py +0 -0
  37. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/local-tests/historianmulti/test_getCurrentDataPoints.py +0 -0
  38. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/local-tests/historianmulti/test_getInterpolatedPoints.py +0 -0
  39. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/local-tests/historianmulti/test_getInterpolatedRange.py +0 -0
  40. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/local-tests/historianmulti/test_getMetaData.py +0 -0
  41. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/local-tests/historianmulti/test_getRawDatapoints.py +0 -0
  42. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/local-tests/historianmulti/test_listDataTags.py +0 -0
  43. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/local-tests/historianmulti/test_tagManagement.py +0 -0
  44. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/local-tests/historianmulti/test_writePoints.py +0 -0
  45. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/local-tests/run_tests.py +0 -0
  46. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/modelbuilder/__init__.py +0 -0
  47. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/modelbuilder/src/__init__.py +0 -0
  48. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/modelbuilder/src/assetmodelbuilder.py +0 -0
  49. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/modelbuilder/src/assetmodelcsvwriter.py +0 -0
  50. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/modelbuilder/src/assetmodelutilities.py +0 -0
  51. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/modelbuilder/src/configmanager.py +0 -0
  52. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/modelbuilder/src/connectors/__init__.py +0 -0
  53. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/modelbuilder/src/connectors/boltconnector.py +0 -0
  54. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/modelbuilder/src/connectors/dbconnectors.py +0 -0
  55. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/modelbuilder/src/connectors/genericconnector.py +0 -0
  56. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/modelbuilder/src/connectors/httpsconnector.py +0 -0
  57. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/modelbuilder/src/csvcontentsmanager.py +0 -0
  58. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/modelbuilder/src/csvwriter.py +0 -0
  59. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/modelbuilder/src/fileanalyser.py +0 -0
  60. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/modelbuilder/src/filemanager.py +0 -0
  61. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/modelbuilder/src/messages.py +0 -0
  62. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/modelbuilder/src/processors/__init__.py +0 -0
  63. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/modelbuilder/src/processors/cypherfileprocessor.py +0 -0
  64. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/modelbuilder/src/processors/labelmanager.py +0 -0
  65. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/modelbuilder/src/processors/nodefileprocessor.py +0 -0
  66. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/modelbuilder/src/processors/propertymanager.py +0 -0
  67. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/modelbuilder/src/processors/relationshipfileprocessor.py +0 -0
  68. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/modelbuilder/src/processors/relationshipmanager.py +0 -0
  69. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/modelbuilder/src/property.py +0 -0
  70. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/modelbuilder/src/queries/__init__.py +0 -0
  71. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/modelbuilder/src/queries/cypherbuilder.py +0 -0
  72. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/modelbuilder/src/queries/query.py +0 -0
  73. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/modelbuilder/src/versionmanager.py +0 -0
  74. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/pyproject.toml +0 -0
  75. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/python_eigen_ingenuity_nocli.egg-info/SOURCES.txt +0 -0
  76. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/python_eigen_ingenuity_nocli.egg-info/dependency_links.txt +0 -0
  77. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/python_eigen_ingenuity_nocli.egg-info/requires.txt +0 -0
  78. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/python_eigen_ingenuity_nocli.egg-info/top_level.txt +0 -0
  79. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/regressiontests/__init__.py +0 -0
  80. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/regressiontests/eigeningenuity/__init__.py +0 -0
  81. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/regressiontests/eigeningenuity/common.py +0 -0
  82. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/regressiontests/eigeningenuity/common_multi.py +0 -0
  83. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/regressiontests/eigeningenuity/historian/__init__.py +0 -0
  84. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/regressiontests/eigeningenuity/historian/common.py +0 -0
  85. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/regressiontests/eigeningenuity/historian/test_getCurrentDataPoints.py +0 -0
  86. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/regressiontests/eigeningenuity/historian/test_getInterpolatedPoints.py +0 -0
  87. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/regressiontests/eigeningenuity/historian/test_getInterpolatedRange.py +0 -0
  88. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/regressiontests/eigeningenuity/historian/test_getMetaData.py +0 -0
  89. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/regressiontests/eigeningenuity/historian/test_getRawDataPoints.py +0 -0
  90. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/regressiontests/eigeningenuity/historian/test_listDataTags.py +0 -0
  91. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/regressiontests/eigeningenuity/historian/test_writePoints.py +0 -0
  92. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/regressiontests/eigeningenuity/historian-multi/__init__.py +0 -0
  93. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/regressiontests/eigeningenuity/historian-multi/common_multi.py +0 -0
  94. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/regressiontests/eigeningenuity/historian-multi/test_getClosestRawPoint.py +0 -0
  95. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/regressiontests/eigeningenuity/historian-multi/test_getCurrentDataPoints.py +0 -0
  96. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/regressiontests/eigeningenuity/historian-multi/test_getInterpolatedPoints.py +0 -0
  97. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/regressiontests/eigeningenuity/historian-multi/test_getInterpolatedRange.py +0 -0
  98. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/regressiontests/eigeningenuity/historian-multi/test_getMetaData.py +0 -0
  99. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/regressiontests/eigeningenuity/historian-multi/test_getRawDatapoints.py +0 -0
  100. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/regressiontests/eigeningenuity/historian-multi/test_listDataTags.py +0 -0
  101. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/regressiontests/eigeningenuity/historian-multi/test_tagManagement.py +0 -0
  102. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/regressiontests/eigeningenuity/historian-multi/test_writePoints.py +0 -0
  103. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/requirements.txt +0 -0
  104. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/setup.cfg +0 -0
  105. {python_eigen_ingenuity_nocli-0.5.24b2 → python_eigen_ingenuity_nocli-0.5.25}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-eigen-ingenuity-nocli
3
- Version: 0.5.24b2
3
+ Version: 0.5.25
4
4
  Summary: A python library used to query data from the Eigen Ingenuity system
5
5
  Home-page: https://www.eigen.co/
6
6
  Author: Murray Callander
@@ -0,0 +1,221 @@
1
+ # Python Eigen Ingenuity SDK
2
+
3
+ ## Overview
4
+
5
+ **Python Eigen Ingenuity** is a comprehensive Python library for accessing industrial data from Eigen Ingenuity instances. It enables seamless integration with time-series data, asset models, event logs, and SQL databases for analytics, automation, and ML workflows.
6
+
7
+ Supports Python 3.12+
8
+
9
+ ---
10
+
11
+ ## Table of Contents
12
+
13
+ - [Python Eigen Ingenuity SDK](#python-eigen-ingenuity-sdk)
14
+ - [Overview](#overview)
15
+ - [Table of Contents](#table-of-contents)
16
+ - [Core Modules](#core-modules)
17
+ - [1. Historian Multi](#1-historian-multi)
18
+ - [2. Asset Model](#2-asset-model)
19
+ - [3. Eventlog](#3-eventlog)
20
+ - [4. SQL](#4-sql)
21
+ - [5. Common Menu](#5-common-menu)
22
+ - [6. Elastic (Deprecated)](#6-elastic-deprecated)
23
+ - [7. Historian (Deprecated)](#7-historian-deprecated)
24
+ - [Authentication](#authentication)
25
+ - [Key Features](#key-features)
26
+ - [Further Documentation](#further-documentation)
27
+ - [Support](#support)
28
+
29
+ ---
30
+
31
+ ## Core Modules
32
+
33
+ Each module is queried by first instantiating a client object that manages onnection to a certain api. e.g. `get_histoiran_multi()` then all queries are performed as methods on the returned class
34
+
35
+ e.g.
36
+
37
+ ```
38
+ hm = get_historian_multi("demo.eigen.co", "Demo-influxdb")
39
+ current = hm.getCurrentDataPoints("DEMO_02TI301.PV")
40
+ ```
41
+
42
+ ### 1. Historian Multi
43
+
44
+ Query time-series data from multiple historians simultaneously. Handles reading, writing, and managing data point metadata.
45
+
46
+ **Connection Function:**
47
+
48
+ - `get_historian_multi` — Initialize Historian Multi client
49
+
50
+ **Reading Data Functions:**
51
+
52
+ - `getCurrentDataPoints` — Fetch the latest tag values instantly
53
+ - `getInterpolatedPoints` — Retrieve interpolated data at specific timestamps
54
+ - `getInterpolatedRange` — Get interpolated data across a time range
55
+ - `getRawDatapoints` — Fetch raw historian data without interpolation
56
+ - `getClosestRawPoint` — Find the nearest raw data point to a specific time
57
+
58
+ **Aggregation Functions:**
59
+
60
+ - `getAggregates` — Compute statistics (min, max, avg, stdDev, median, count, etc.)
61
+ - `getAggregateIntervals` — Calculate aggregates over regular time intervals
62
+
63
+ **Metadata Functions:**
64
+
65
+ - `listHistorians` — List all available historian connections
66
+ - `listDataTags` — Retrieve all data tags from a historian
67
+ - `getMetaData` — Fetch metadata for specific tags
68
+ - `createTag` — Create a new data tag
69
+ - `updateTag` — Modify existing tag configuration
70
+
71
+ **Writing Data Functions:**
72
+
73
+ - `writePoints` — Write individual data points to tags
74
+ - `writePointsBatch` — Batch write multiple data points efficiently
75
+ - `createPoint` — Create a formatted data point object
76
+ - `createAndPopulateTag` — Create a new tag and immediately populate it with data
77
+
78
+ ---
79
+
80
+ ### 2. Asset Model
81
+
82
+ Navigate the Neo4J asset model to browse assets, their properties, related assets, and associated measurements.
83
+
84
+ **Connection Function:**
85
+
86
+ - `get_assetmodel` — Initialize Asset Model Client
87
+
88
+ **Core Functions:**
89
+
90
+ - `getRelatedAssets` — Retrieve all instruments or components related to an asset
91
+ - `getProperties` — Get metadata fields and custom properties from assets
92
+ - `getMeasurements` — Fetch all timeseries measurements configured for an asset
93
+ - `executeRawQuery` — Run custom Neo4J Cypher queries against the asset model
94
+ - `getDocuments` — Retrieve reference documents attached to assets
95
+ - `getLabels` — Get asset classification labels
96
+ - `getMatchingNodes` — Find assets matching specific criteria
97
+
98
+ ---
99
+
100
+ ### 3. Eventlog
101
+
102
+ Query, filter, and manage event records in the Ingenuity event log system.
103
+
104
+ **Connection Function:**
105
+
106
+ - `get_eventlog` — Initialize Eventlog client
107
+
108
+ **Query Functions:**
109
+
110
+ - `getEvents` — Execute raw queries with filters (severity, type, source, etc.)
111
+ - `getEventsBySource` — Filter events by source identifier (partial or exact match)
112
+ - `getEventsByType` — Filter events by event type
113
+ - `getEventsById` — Retrieve events by event ID, external ID, or episode ID
114
+
115
+ **Management Functions:**
116
+
117
+ - `pushToEventlog` — Create and push new events to the event log
118
+ - `deleteEventsById` — Remove unwanted events in bulk
119
+
120
+ ---
121
+
122
+ ### 4. SQL
123
+
124
+ Execute read-only queries against SQL databases connected to Ingenuity instances.
125
+
126
+ **Connection Function:**
127
+
128
+ - `get_sql` — Initialize SQL client
129
+
130
+ **Query Functions:**
131
+
132
+ - `executeRawQuery` — Execute raw SQL queries with multiple output formats (JSON, DataFrame, CSV file)
133
+ - `listDatabases` — Retrieve list of available SQL databases
134
+ - `listTables` — List tables within a specific database
135
+
136
+ ---
137
+
138
+ ### 5. Common Menu
139
+
140
+ Query asset relationships, measurements, properties, and documents through a unified interface.
141
+
142
+ **Connection Function:**
143
+
144
+ - `get_common_menu` — Initialize Common Menu client
145
+
146
+ **Functions:**
147
+
148
+ - `getRelatedAssets` — Query related assets
149
+ - `getProperties` — Fetch asset properties
150
+ - `getMeasurements` — Get measurements for assets
151
+ - `getDocuments` — Retrieve associated documents
152
+ - `getEvents` — Query events from the Common Menu perspective
153
+ - `getDrivers` — Get driver information
154
+
155
+ ---
156
+
157
+ ### 6. Elastic (Deprecated)
158
+
159
+ Legacy module for querying Elasticsearch-backed data sources. Flagged for removal in a future release. **Use Eventlog instead.**
160
+
161
+ **Connection Function:**
162
+
163
+ - `get_elastic` — Initialize legacy Elastic client
164
+
165
+ ---
166
+
167
+ ### 7. Historian (Deprecated)
168
+
169
+ Legacy single-historian client. Flagged for removal in a future release. **Use Historian Multi instead.**
170
+
171
+ **Connection Function:**
172
+
173
+ - `get_historian` — Initialize legacy Historian client for a single data source
174
+
175
+ ---
176
+
177
+ ## Authentication
178
+
179
+ The library supports Azure authentication with:
180
+
181
+ - **User Credentials Flow** — Interactive authentication
182
+ - **CLIENT_CREDENTIALS Flow** — Service principal authentication
183
+ - **API Token** — Direct token-based access
184
+
185
+ **Configuration Functions:**
186
+
187
+ - `set_azure_tenant_id` — Specify Azure tenant
188
+ - `set_azure_client_id` — Specify client/application ID
189
+ - `set_azure_client_secret` — Specify client secret (for CLIENT_CREDENTIALS)
190
+ - `set_api_token` — Set API token alternative to Azure auth
191
+ - `set_auth_scope` — Configure OAuth scope
192
+ - `disable_azure_auth` — Skip Azure authentication
193
+ - `disable_auth_token_cache` — Disable token caching for security
194
+ - `clear_auth_token_cache` — Remove cached tokens
195
+
196
+ ---
197
+
198
+ ## Key Features
199
+
200
+ ✅ **Multi-Source Data Access** — Query historians, asset models, SQL, and events in one library
201
+ ✅ **Aggregations & Statistics** — Built-in support for min, max, average, standard deviation, median, and more
202
+ ✅ **Batch Operations** — Efficient bulk writes and queries
203
+ ✅ **Azure Authentication** — Enterprise authentication support
204
+ ✅ **Flexible Output** — JSON, DataFrames, files, or raw responses
205
+ ✅ **Time-Series Focused** — Purpose-built for industrial data workflows
206
+ ✅ **Neo4J Integration** — Direct access to asset model graph database
207
+
208
+ ---
209
+
210
+ ## Further Documentation
211
+
212
+ For complete function signatures, detailed parameters, and code examples, visit:
213
+
214
+ **📖 [https://docs.eigeningenuity.co/developing-with-eigen/python-library/](https://docs.eigeningenuity.co/developing-with-eigen/python-library/)**
215
+
216
+ ---
217
+
218
+ ## Support
219
+
220
+ - **Documentation Portal:** https://docs.eigeningenuity.co/
221
+ - **Support Tickets:** https://eigen.freshdesk.com
@@ -37,10 +37,22 @@ requests.packages.urllib3.disable_warnings(category=InsecureRequestWarning)
37
37
 
38
38
 
39
39
  class AssetModel(object):
40
- """An assetmodel instance which talks the Eigen Neo4j endpoint."""
40
+ """AssetModel client for Ingenuity Neo4j API endpoints."""
41
41
 
42
42
  def __init__(self, baseurl, auth, instance="default"):
43
- """This is a constructor. It takes in a URL like https://demo.eigen.co/ei-applet/"""
43
+ """Initialize AssetModel client.
44
+
45
+ Args:
46
+ baseurl (str): Base URL of the AssetModel service (e.g. https://demo.eigen.co/ei-applet/).
47
+ auth: Authentication credentials or session.
48
+ instance (str, optional): Neo4j instance name. Defaults to "default".
49
+
50
+ Returns:
51
+ None
52
+
53
+ Docs:
54
+ https://docs.eigeningenuity.co/developing-with-eigen/python-library/asset-model/get-assetmodel
55
+ """
44
56
  self.baseurl = baseurl
45
57
  if instance == "default":
46
58
  self.instance = ""
@@ -50,7 +62,14 @@ class AssetModel(object):
50
62
  self.auth = auth
51
63
 
52
64
  def _testConnection(self):
53
- """Preflight Request to verify connection to ingenuity"""
65
+ """Verify that the AssetModel endpoint is reachable.
66
+
67
+ Raises:
68
+ ConnectionError: If the endpoint cannot be reached.
69
+
70
+ Docs:
71
+ https://docs.eigeningenuity.co/developing-with-eigen/python-library/asset-model/get-assetmodel
72
+ """
54
73
  try:
55
74
  status = requests.get(self.baseurl, verify=False).status_code
56
75
  except (URLError, ConnectionError):
@@ -61,24 +80,37 @@ class AssetModel(object):
61
80
  )
62
81
 
63
82
  def _doNeo4jQueryRequest(self, data):
83
+ """Execute a Neo4j query against the configured endpoint.
84
+
85
+ Args:
86
+ data (dict): Payload containing query information.
87
+
88
+ Returns:
89
+ dict: API response JSON.
90
+
91
+ Docs:
92
+ https://docs.eigeningenuity.co/developing-with-eigen/python-library/asset-model/get-assetmodel
93
+ """
64
94
  # self._testConnection()
65
95
 
66
96
  url = f"{self.baseurl}neo4j/{self.instance}query"
67
97
  return _do_eigen_post_request(url, data, self.auth)
68
98
 
69
99
  def executeRawQuery(self, query: str, output: str = "json"):
70
- """
71
- Executes a raw neo4j query against AssetModel via the AssetModel API.
100
+ """Execute a raw Neo4j query via the AssetModel API.
72
101
 
73
102
  Args:
74
- query: A string containing a query in neo4j, for information on neo4j queries see https://neo4j.com/developer/cypher/
103
+ query (str): Cypher query string.
104
+ output (str, optional): Output format, either "json", "df", or "raw". Defaults to "json".
75
105
 
76
106
  Returns:
77
- A Json containing the neo4j response to the query.
107
+ list|pandas.DataFrame|dict: Query results in the requested format.
78
108
 
79
109
  Raises:
80
- KeyError: Raises an exception
110
+ EigenException: If query fails.
81
111
 
112
+ Docs:
113
+ https://docs.eigeningenuity.co/developing-with-eigen/python-library/asset-model/execute-raw-query
82
114
  """
83
115
  payload = {"q": query}
84
116
  resp = self._doNeo4jQueryRequest(payload)
@@ -102,26 +134,22 @@ class AssetModel(object):
102
134
  def getMeasurements(
103
135
  self, nodes: str, prop: str = "code", measurement: str = "", output="json"
104
136
  ):
105
- """
106
- Return all measurement nodes directly related to a given asset via the AssetModel API. For historian/timeseries metadata, use the commonmenu method instead.
137
+ """Fetch measurement tags related to an asset node.
107
138
 
108
139
  Args:
109
- nodes: The value of the property to match
110
- prop (Optional): The property on to query nodes on. Defaults to code.
111
- measurement (Optional): Return only tags for a specified measurement type. Defaults to return all tags.
140
+ nodes (str|list): Node identifier(s) to query.
141
+ prop (str, optional): Property to match on. Defaults to "code".
142
+ measurement (str, optional): Measurement type filter. Defaults to all.
143
+ output (str, optional): Output format: "json", "df", or "raw". Defaults to "json".
112
144
 
113
145
  Returns:
114
- json:A Json containing all nodes with a relation to any node that meets the criteria, and their relationship type. Structure as follows:
115
- [
116
- {"code": "AssetCode",
117
- "measurementName": "MeasurementType",
118
- "tag": "TagCode"},
119
- ...
120
- ]
146
+ list|pandas.DataFrame|dict: Measurements data.
121
147
 
122
148
  Raises:
123
- EigenException: Raises an exception if query fails
149
+ EigenException: If query fails.
124
150
 
151
+ Docs:
152
+ https://docs.eigeningenuity.co/developing-with-eigen/python-library/asset-model/get-measurements
125
153
  """
126
154
  nodes_list = force_list(nodes)
127
155
 
@@ -174,24 +202,21 @@ class AssetModel(object):
174
202
  )
175
203
 
176
204
  def getDocuments(self, nodes: Union[str, list], match=None, output="json"):
177
- """
178
- Return all Documents related to nodes via the AssetModel API.
205
+ """Fetch documents related to specified asset nodes.
179
206
 
180
207
  Args:
181
- nodes: The name(s) of the node(s) to query documents for
182
- match (Optional): Filter returned Documents to those with filenames matching a string
183
- output (Optional): The format in which to return the data. Accepts one of:
184
- - "raw" - The raw json returned by the API;
185
- - "json" - A processed version of the json response;
186
- - "df" - A formatted pandas dataframe object;
208
+ nodes (str|list): Asset node identifier(s).
209
+ match (str, optional): Filter documents by filename/description substring.
210
+ output (str, optional): Output format: "json", "df", or "raw". Defaults to "json".
187
211
 
188
212
  Returns:
189
- Results: The set of all documents related to the nodes, grouped by node code,
190
- the format is dependent on the output parameter.
213
+ dict|pandas.DataFrame|dict: Documents grouped by node or in raw response format.
191
214
 
192
215
  Raises:
193
- EigenException: Raises an exception if query fails
216
+ EigenException: If query fails.
194
217
 
218
+ Docs:
219
+ https://docs.eigeningenuity.co/developing-with-eigen/python-library/asset-model/get-documents
195
220
  """
196
221
  nodes_list = force_list(nodes)
197
222
 
@@ -259,24 +284,20 @@ class AssetModel(object):
259
284
  )
260
285
 
261
286
  def getLabels(self, codes: Union[str, list] = None, output: str = "json"):
262
- """
263
- List all labels used in an assetmodel instance, or the list of all labels of given nodes
287
+ """Retrieve asset node labels.
264
288
 
265
289
  Args:
266
- codes (Optional): The value(s) of the code property for the nodes to get labels for.
267
- Can be a single string or a list of strings.
268
- output (Optional): The format in which to return the data. Accepts:
269
- - "json" - A processed version of the response
270
- - "raw" - The raw json returned by the API
271
- - "df" - A formatted pandas dataframe object
290
+ codes (str|list, optional): Node codes to filter by. Defaults to None (all labels).
291
+ output (str, optional): Output format: "json", "df", or "raw". Defaults to "json".
272
292
 
273
293
  Returns:
274
- If codes is None: A list of all node labels/types present in the model
275
- If codes is provided: For single code - list of labels; For multiple codes -
276
- structured data with nodeCode and labels for each node
294
+ list|pandas.DataFrame|dict: Node labels in requested format.
277
295
 
278
296
  Raises:
279
- EigenException: Raises an exception if query fails
297
+ EigenException: If query fails.
298
+
299
+ Docs:
300
+ https://docs.eigeningenuity.co/developing-with-eigen/python-library/asset-model/get-labels
280
301
  """
281
302
  if codes is None:
282
303
  # Get all labels in the database
@@ -359,27 +380,26 @@ class AssetModel(object):
359
380
  exact: bool = False,
360
381
  output: str = "json",
361
382
  ):
362
- """
363
- Return all properties of matching nodes via a neo4j query response
383
+ """Find nodes in AssetModel matching given criteria.
364
384
 
365
385
  Args:
366
- criteria: Dictionary of key/value pairs to match on nodes. Special keys:
367
- - "@labels": Match nodes with specific labels (can be string or list)
368
- - "@ids": Match nodes with specific IDs (can be string or list)
369
- - Regular properties: Match on node properties
370
- match_all (Optional): Whether to match ALL criteria (AND) or ANY criteria (OR). Defaults to True (AND)
371
- exact (Optional): Whether to use exact matching (=) or partial matching (CONTAINS) for string properties. Defaults to False
372
- output (Optional): The format in which to return the data. Accepts:
373
- - "json" - A processed version of the response
374
- - "raw" - The raw json returned by the API
375
- - "df" - A formatted pandas dataframe object
386
+ criteria (dict): Filter criteria with optional special keys:
387
+ - "@labels" (str|list): Node labels to match.
388
+ - "@ids" (str|list): Node IDs to match.
389
+ - Any other property to match on node properties.
390
+ match_all (bool, optional): All conditions (AND) if True, else any (OR). Defaults to True.
391
+ exact (bool, optional): Exact match for strings if True; otherwise CONTAINS is used. Defaults to False.
392
+ output (str, optional): Output format: "json", "df", or "raw". Defaults to "json".
376
393
 
377
394
  Returns:
378
- A Json containing all nodes that match the criteria.
395
+ list|pandas.DataFrame|dict: Matching nodes in requested format.
379
396
 
380
397
  Raises:
381
- EigenException: Raises an exception if query fails
382
- ValueError: Raises an exception if criteria is empty or invalid
398
+ EigenException: If query fails.
399
+ ValueError: If criteria is empty or invalid.
400
+
401
+ Docs:
402
+ https://docs.eigeningenuity.co/developing-with-eigen/python-library/asset-model/get-matching-nodes
383
403
  """
384
404
 
385
405
  if not criteria:
@@ -490,25 +510,23 @@ class AssetModel(object):
490
510
  relation: str = None,
491
511
  output: str = "json",
492
512
  ):
493
- """
494
- Return all assets directly related to given assets.
513
+ """Fetch assets related to given source asset nodes.
495
514
 
496
515
  Args:
497
- prop: The property on which to match a node
498
- nodes: The value(s) of the property to match (can be single string or list)
499
- exact: Whether or not to only apply to assets exactly matching value of node (Defaults to False)
500
- relation: Specify a required relationship type for returned nodes
501
- output (Optional): The format in which to return the data. Accepts:
502
- - "json" - A processed version of the response
503
- - "raw" - The raw json returned by the API
504
- - "df" - A formatted pandas dataframe object
516
+ nodes (str|list): Asset identifiers to match.
517
+ prop (str, optional): Property used for matching. Defaults to "code".
518
+ exact (bool, optional): Exact matching when True, partial otherwise. Defaults to False.
519
+ relation (str, optional): Relationship type filter. Defaults to None.
520
+ output (str, optional): Output format: "json", "df", or "raw". Defaults to "json".
505
521
 
506
522
  Returns:
507
- A Json containing all nodes with a relation to any node that meets the criteria, and their relationship type.
523
+ list|pandas.DataFrame|dict: Related assets.
508
524
 
509
525
  Raises:
510
- EigenException: Raises an exception if query fails
526
+ EigenException: If query fails.
511
527
 
528
+ Docs:
529
+ https://docs.eigeningenuity.co/developing-with-eigen/python-library/asset-model/get-related-assets
512
530
  """
513
531
  nodes_list = force_list(nodes)
514
532
 
@@ -560,15 +578,17 @@ class AssetModel(object):
560
578
  def get_assetmodel(
561
579
  eigenserver: EigenServer = None, instance: str = "default"
562
580
  ) -> AssetModel:
563
- """
564
- Convenience function for querying data from the Ingenuity Neo4J Assetmodel
581
+ """Convenience function to instantiate an AssetModel client.
565
582
 
566
583
  Args:
567
- (Optional) eigenserver: An instance of EigenServer() to query. Defaults to the EIGENSERVER environmental variable if not provided. Must be provided in one of these ways
568
- (Optional) instance: The instance name of the AssetModel to connect to, if multiple neo4j instances are available. Defaults to "default".
584
+ eigenserver (EigenServer|str|None): EigenServer instance or base URL. Defaults to EIGENSERER env var if None.
585
+ instance (str, optional): Neo4j instance name (default "default").
569
586
 
570
587
  Returns:
571
- An object defining a connection to the AssetModel
588
+ AssetModel: Initialized AssetModel client.
589
+
590
+ Docs:
591
+ https://docs.eigeningenuity.co/developing-with-eigen/python-library/asset-model/get-assetmodel
572
592
  """
573
593
  if eigenserver is None:
574
594
  eigenserver = get_default_server()
@@ -1,4 +1,7 @@
1
- import os, msal, atexit, keyring
1
+ import os
2
+ import msal
3
+ import atexit
4
+ import keyring
2
5
  from cryptography.fernet import Fernet
3
6
  from getpass import getuser
4
7
  import eigeningenuity.settings as settings
@@ -123,7 +126,6 @@ def _authenticate_azure_user(baseurl):
123
126
  'Content-Type': 'application/json'
124
127
  }
125
128
 
126
-
127
129
  def _backup_auth_azure_user(_uri):
128
130
  global url
129
131
  baseurl = url