memory_base
MemoryBase
MemoryBase object that handles the feature of a braincube.
get_data(self, var_ids, filters=None, label_type='bcid', dataframe=False)
Get data from the memory bases.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
var_ids |
List[Union[int,str]] |
bcIds of variables for which the data are collected. |
required |
filters |
List[Dict[str, Any]] |
List of filters to apply to the request. |
None |
label_type |
str |
"bcid" / "name" |
'bcid' |
dataframe |
bool |
True, return Dataframe; False, return Dict |
False |
Returns:
Type | Description |
---|---|
Union[pandas.core.frame.DataFrame, Dict[str, Any]] |
A dictionary of data list or a pandas DataFrame. |
get_datagroup(self, bcid)
Get a DataGroup from its bcId.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
bcid |
Union[str, int] |
Data group bcid. |
required |
Returns:
Type | Description |
---|---|
DataGroup |
A data group description. |
get_datagroup_list(self, **kwargs)
Get a list a of data groups from a list of ids.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
**kwargs |
|
Optional page and page_size. |
{} |
Returns:
Type | Description |
---|---|
List[braincube_connector.memory_base.nested_resources.datagroup.DataGroup] |
A list of data groups. |
get_event(self, bcid)
Get a Event from its bcId.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
bcid |
Union[str, int] |
Event bcid. |
required |
Returns:
Type | Description |
---|---|
Event |
A event description. |
get_event_list(self, **kwargs)
Get a list a of events from a list of ids.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
**kwargs |
|
Optional page and page_size. |
{} |
Returns:
Type | Description |
---|---|
List[braincube_connector.memory_base.nested_resources.event.Event] |
A list of events. |
get_job(self, bcid)
Get a job description from its bcId.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
bcid |
Union[str, int] |
Job bcid. |
required |
Returns:
Type | Description |
---|---|
JobDescription |
A job description. |
get_job_list(self, **kwargs)
Get a list a of job descriptions from a list of ids.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
**kwargs |
|
Optional page and page_size. |
{} |
Returns:
Type | Description |
---|---|
List[braincube_connector.memory_base.nested_resources.job.JobDescription] |
A list of Job descriptions. |
get_order_variable_long_id(self)
Get the long id of the memory base order variable.
Returns:
Type | Description |
---|---|
str |
A variable long id. |
get_rule(self, bcid)
Get a variable description from its bcId.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
bcid |
Union[str, int] |
Rule bcid. |
required |
Returns:
Type | Description |
---|---|
RuleDescription |
A Rule description. |
get_rule_list(self, **kwargs)
Get a list a of rule descriptions from a list of ids.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
**kwargs |
|
Optional page and page_size. |
{} |
Returns:
Type | Description |
---|---|
RuleDescription |
A list of Rule descriptions. |
get_variable(self, bcid)
Get a variable description from its bcId.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
bcid |
Union[str, int] |
Variable bcid. |
required |
Returns:
Type | Description |
---|---|
VariableDescription |
A variable description. |
get_variable_list(self, **kwargs)
Get a list a of variable descriptions from a list of ids.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
**kwargs |
|
Optional page and page_size. |
{} |
Returns:
Type | Description |
---|---|
List[braincube_connector.memory_base.nested_resources.variable.VariableDescription] |
A list of Variable descriptions. |