mkt.schema.io_utils.serialize_conservation_data
- mkt.schema.io_utils.serialize_conservation_data(conservation_data: BaseModel, suffix: str = 'json', str_path: str | None = None) str | None[source]
Serialize a
KLIFSConservationDataartifact to a single file.Unlike
serialize_kinase_dict()(one file per kinase), this writes the whole single-object artifact to{str_path}/KLIFSConservationData.{suffix}, reusing theDICT_FUNCSserialization registry.- Parameters:
conservation_data (BaseModel) – The
mkt.schema.conservation_schema.KLIFSConservationDataobject.suffix (str) – Serialization type supported: json, yaml, toml.
str_path (str | None) – Directory to write into, by default None (the
mkt.schemapackage directory).
- Returns:
Path written, or None if the suffix is unsupported.
- Return type:
str | None