medcat.storage.schema ===================== .. py:module:: medcat.storage.schema Attributes ---------- .. autoapisummary:: medcat.storage.schema.logger medcat.storage.schema._CLASS_PATH medcat.storage.schema._INIT_PARTS_PATH medcat.storage.schema.DEFAULT_SCHEMA_FILE Exceptions ---------- .. autoapisummary:: medcat.storage.schema.IllegalSchemaException Functions --------- .. autoapisummary:: medcat.storage.schema._cls2path medcat.storage.schema.save_schema medcat.storage.schema.load_schema Module Contents --------------- .. py:data:: logger .. py:data:: _CLASS_PATH :value: 'serialised-class' .. py:data:: _INIT_PARTS_PATH :value: 'init-parts' .. py:data:: DEFAULT_SCHEMA_FILE :value: '.schema.json' .. py:function:: _cls2path(cls) .. py:function:: save_schema(file_name, cls, init_parts) Saves the schema of a class to the specified file. :param file_name: The file to save to. :type file_name: str :param cls: The class in question :type cls: Type :param init_parts list[str]: The parts of the . .. py:function:: load_schema(file_name) Loads the schema for a folder of deserialisable files from the file. :param file_name: The schema file :type file_name: str :Returns: **tuple[str, list[str]]** -- The class package/name along with the parts needed for initialising. .. py:exception:: IllegalSchemaException(*args) Bases: :py:obj:`ValueError` Inappropriate argument value (of correct type). .. py:method:: __init__(*args) Initialize self. See help(type(self)) for accurate signature. .. py:class:: __cause__ exception cause .. py:class:: __context__ exception context .. py:method:: __delattr__() Implement delattr(self, name). .. py:method:: __dir__() Default dir() implementation. .. py:method:: __eq__() Return self==value. .. py:method:: __format__() Default object formatter. .. py:method:: __ge__() Return self>=value. .. py:method:: __getattribute__() Return getattr(self, name). .. py:method:: __gt__() Return self>value. .. py:method:: __hash__() Return hash(self). .. py:method:: __le__() Return self<=value. .. py:method:: __lt__() Return self