Module markov.api.data.data_family
Classes
class AllDataFamilyResponse (data_families: List[DataFamily],
count: int,
return_code: str,
message: str)-
AllDataFamilyResponse(data_families: 'List[DataFamily]', count: 'int', return_code: 'str', message: 'str')
Static methods
def from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) ‑> ~A
def from_json(s: str | bytes | bytearray,
*,
parse_float=None,
parse_int=None,
parse_constant=None,
infer_missing=False,
**kw) ‑> ~Adef schema(*,
infer_missing: bool = False,
only=None,
exclude=(),
many: bool = False,
context=None,
load_only=(),
dump_only=(),
partial: bool = False,
unknown=None) ‑> dataclasses_json.mm.SchemaF[~A]
Instance variables
var count : int
var data_families : List[DataFamily]
var message : str
var return_code : str
Methods
def get_dict(self) ‑> Dict
def get_json(self) ‑> str
def to_dict(self, encode_json=False) ‑> Dict[str, dict | list | str | int | float | bool | None]
def to_json(self,
*,
skipkeys: bool = False,
ensure_ascii: bool = True,
check_circular: bool = True,
allow_nan: bool = True,
indent: int | str | None = None,
separators: Tuple[str, str] | None = None,
default: Callable | None = None,
sort_keys: bool = False,
**kw) ‑> str
class DSForDataFamilyResponse (ds_info: List[DSNameIdTuple],
return_code: str,
message: str)-
DSForDataFamilyResponse(ds_info: 'List[DSNameIdTuple]', return_code: 'str', message: 'str')
Static methods
def from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) ‑> ~A
def from_json(s: str | bytes | bytearray,
*,
parse_float=None,
parse_int=None,
parse_constant=None,
infer_missing=False,
**kw) ‑> ~Adef schema(*,
infer_missing: bool = False,
only=None,
exclude=(),
many: bool = False,
context=None,
load_only=(),
dump_only=(),
partial: bool = False,
unknown=None) ‑> dataclasses_json.mm.SchemaF[~A]
Instance variables
var ds_info : List[DSNameIdTuple]
var message : str
var return_code : str
Methods
def to_dict(self, encode_json=False) ‑> Dict[str, dict | list | str | int | float | bool | None]
def to_json(self,
*,
skipkeys: bool = False,
ensure_ascii: bool = True,
check_circular: bool = True,
allow_nan: bool = True,
indent: int | str | None = None,
separators: Tuple[str, str] | None = None,
default: Callable | None = None,
sort_keys: bool = False,
**kw) ‑> str
class DSNameIdTuple (name: str, ds_id: str)
-
DSNameIdTuple(name: 'str', ds_id: 'str')
Static methods
def from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) ‑> ~A
def from_json(s: str | bytes | bytearray,
*,
parse_float=None,
parse_int=None,
parse_constant=None,
infer_missing=False,
**kw) ‑> ~Adef schema(*,
infer_missing: bool = False,
only=None,
exclude=(),
many: bool = False,
context=None,
load_only=(),
dump_only=(),
partial: bool = False,
unknown=None) ‑> dataclasses_json.mm.SchemaF[~A]
Instance variables
var ds_id : str
var name : str
Methods
def to_dict(self, encode_json=False) ‑> Dict[str, dict | list | str | int | float | bool | None]
def to_json(self,
*,
skipkeys: bool = False,
ensure_ascii: bool = True,
check_circular: bool = True,
allow_nan: bool = True,
indent: int | str | None = None,
separators: Tuple[str, str] | None = None,
default: Callable | None = None,
sort_keys: bool = False,
**kw) ‑> str
class DataFamily (name: str,
notes: str,
create_date: str = '',
user_id: Optional[str] = '',
team_id: Optional[str] = '',
norm_name: Optional[str] = '',
record_id: Optional[str] = '',
workspace_id: Optional[str] = '',
df_id: Optional[str] = '',
misc: Optional[dict] = <factory>)-
Represents a high level collection of DataSets that solve similar purpose and have similar expected behavior. This object is returned after a DataFamily is registered with Markov
Ex
CreditCardFraudFamily en-US would contain all the english US datasets for CreditCardFraud in the US.
Static methods
def create_from_dict(json_dict: Dict) ‑> DataFamily
-
Create the DataFamily from a serialized dictionary of this object.
Args
json_dict: Returns:
def create_from_json(json_str: str)
-
Create the DataFamily from Serialized JSON String.
Args
json_str
:str
- Serialized JSON String to fetch the dataFamily.
Returns
DataFamily instance
def from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) ‑> ~A
def from_json(s: str | bytes | bytearray,
*,
parse_float=None,
parse_int=None,
parse_constant=None,
infer_missing=False,
**kw) ‑> ~Adef get_by_id(df_id: str)
-
Given the datafamily_id, get the datafamily if it exists
Args
df_id
:str
- datafamily_id to get DataFamily from if it exists. This should be a valid id
Returns
DataFamily instance
def get_by_name(name)
-
Given the name, get the datafamily if it exists
Args
name
:str
- name of the datafamily
Returns
DataFamily instance
def schema(*,
infer_missing: bool = False,
only=None,
exclude=(),
many: bool = False,
context=None,
load_only=(),
dump_only=(),
partial: bool = False,
unknown=None) ‑> dataclasses_json.mm.SchemaF[~A]
Instance variables
var create_date : str
prop default_schema
-
Returns
Return the default (active) schema of this datafamily
var df_id : str | None
-
variable key value args ({key:value} that you want to store alongside datafamily)
var misc : dict | None
var name : str
-
Short description of what this datafamily is all about. This would help your fellow team mates to understand the purpose of this datafamily.
var norm_name : str | None
var notes : str
var record_id : str | None
var team_id : str | None
var user_id : str | None
var workspace_id : str | None
-
Uniquely identify the DataFamily with Markov
Methods
def add_details(self, details: dict)
-
Flexible user specific key value pair of information to be stored with DataFamily with MarkovML
Args
details
:dict
- key-value pair to store custom key-value field with MarkovML
Returns
None
def clone(self) ‑> DataFamily
-
Clone into a separate DataFamily Object without unique identifier
def dataset_summary(self) ‑> List[DSNameIdTuple]
-
For the given DataFamily Return the list of Dataset NameID tuple which contains dataset name and ds_id
Returns
DSNameIdTuple tuple with name and ds_id
def get_dict(self) ‑> Dict
def get_json(self) ‑> str
def register(self) ‑> DataFamilyRegistrationResponse
def to_dict(self, encode_json=False) ‑> Dict[str, dict | list | str | int | float | bool | None]
def to_json(self,
*,
skipkeys: bool = False,
ensure_ascii: bool = True,
check_circular: bool = True,
allow_nan: bool = True,
indent: int | str | None = None,
separators: Tuple[str, str] | None = None,
default: Callable | None = None,
sort_keys: bool = False,
**kw) ‑> strdef update_default_data_schema(self, data_schema: DataSchema)
-
Get the default DataSchema of this data_set Family. Each DataFamily has an active schema and prior schemas. Schema is computed automatically from the DataSets registered and if there is a schema change, user is prompted to verify with an option to activate the new schema.
Args
data_schema
:DataSchema
- Add a new active schema to this DataFamily.
class DataFamilyRegistrationResponse (df_id: str, return_code: str, message: str, create_date: Optional[str])
-
DataFamilyRegistrationResponse(df_id: 'str', return_code: 'str', message: 'str', create_date: 'Optional[str]')
Static methods
def create_from_dict(value: Dict) ‑> DataFamilyRegistrationResponse
def create_from_json(value: str) ‑> DataFamilyRegistrationResponse
def from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) ‑> ~A
def from_json(s: str | bytes | bytearray,
*,
parse_float=None,
parse_int=None,
parse_constant=None,
infer_missing=False,
**kw) ‑> ~Adef schema(*,
infer_missing: bool = False,
only=None,
exclude=(),
many: bool = False,
context=None,
load_only=(),
dump_only=(),
partial: bool = False,
unknown=None) ‑> dataclasses_json.mm.SchemaF[~A]
Instance variables
var create_date : str | None
var df_id : str
var message : str
var return_code : str
Methods
def get_dict(self) ‑> Dict
def get_json(self) ‑> str
def to_dict(self, encode_json=False) ‑> Dict[str, dict | list | str | int | float | bool | None]
def to_json(self,
*,
skipkeys: bool = False,
ensure_ascii: bool = True,
check_circular: bool = True,
allow_nan: bool = True,
indent: int | str | None = None,
separators: Tuple[str, str] | None = None,
default: Callable | None = None,
sort_keys: bool = False,
**kw) ‑> str
class DataFamilyResponse (record: DataFamily,
return_code: str = 'COMMAND_FAILED',
message: Optional[str] = '')-
DataFamilyResponse(record: 'DataFamily', return_code: 'str' = 'COMMAND_FAILED', message: 'Optional[str]' = '')
Static methods
def from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) ‑> ~A
def from_json(s: str | bytes | bytearray,
*,
parse_float=None,
parse_int=None,
parse_constant=None,
infer_missing=False,
**kw) ‑> ~Adef schema(*,
infer_missing: bool = False,
only=None,
exclude=(),
many: bool = False,
context=None,
load_only=(),
dump_only=(),
partial: bool = False,
unknown=None) ‑> dataclasses_json.mm.SchemaF[~A]
Instance variables
var message : str | None
var record : DataFamily
var return_code : str
Methods
def get_dict(self) ‑> Dict
def get_json(self) ‑> str
def to_dict(self, encode_json=False) ‑> Dict[str, dict | list | str | int | float | bool | None]
def to_json(self,
*,
skipkeys: bool = False,
ensure_ascii: bool = True,
check_circular: bool = True,
allow_nan: bool = True,
indent: int | str | None = None,
separators: Tuple[str, str] | None = None,
default: Callable | None = None,
sort_keys: bool = False,
**kw) ‑> str