CosmoTech_Acceleration_Library.Modelops.core.io.model_reader¶
ModelReader
¶
Bases: GraphHandler
Model Reader for cached data
Source code in CosmoTech_Acceleration_Library/Modelops/core/io/model_reader.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
|
exists(key)
¶
Check if a key exists in Redis :param key: the key :return: True if exists else False
Source code in CosmoTech_Acceleration_Library/Modelops/core/io/model_reader.py
108 109 110 111 112 113 114 |
|
get_relationship_properties_by_type(relationship_type)
¶
Get relationship properties regarding a relationship_type Note: this will work if all relationship (with the same type) have same properties set :param relationship_type: the relationship type :return: the properties list
Source code in CosmoTech_Acceleration_Library/Modelops/core/io/model_reader.py
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
|
get_relationship_types()
¶
Get relationship types :return: relationship types list
Source code in CosmoTech_Acceleration_Library/Modelops/core/io/model_reader.py
55 56 57 58 59 60 |
|
get_relationships_by_type(relationship_type, limit=0)
¶
Get relationships by type :param relationship_type: the relationship type requested :param limit: the limit number of twin retrieved :return: the relationship list corresponding to relationship type parameter
Source code in CosmoTech_Acceleration_Library/Modelops/core/io/model_reader.py
62 63 64 65 66 67 68 69 70 71 72 73 74 |
|
get_twin_properties_by_type(twin_type)
¶
Get twin properties regarding a twin_type Note: this will work if all twin (with the same type) have same properties set :param twin_type: the twin type :return: the properties list
Source code in CosmoTech_Acceleration_Library/Modelops/core/io/model_reader.py
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
|
get_twin_types()
¶
Get twin types :return: twin types list
Source code in CosmoTech_Acceleration_Library/Modelops/core/io/model_reader.py
17 18 19 20 21 22 |
|
get_twins_by_type(twin_type, limit=0)
¶
Get twins by type :param twin_type: the twin type requested :param limit: the limit number of twin retrieved :return: the twin list corresponding to twin type parameter
Source code in CosmoTech_Acceleration_Library/Modelops/core/io/model_reader.py
24 25 26 27 28 29 30 31 32 33 34 35 |
|
query(query, params=None, timeout=None, read_only=False)
¶
Run specified query :param query: the query to run :param params: the parameters for the query if any :param timeout: a specific timeout :param read_only: executes a readonly query if set to True :return: the QueryResult corresponding to specified query
Source code in CosmoTech_Acceleration_Library/Modelops/core/io/model_reader.py
96 97 98 99 100 101 102 103 104 105 106 |
|