Implementing JSONFileDataObject

Defining the JSONFileDataObject abstract class starts with a standard ABCMeta metaclass specification, and some class-level attributes for various purposes:

class JSONFileDataObject(BaseDataObject, metaclass=abc.ABCMeta):
    """
Provides baseline functionality, interface requirements, and 
type-identity for objects that can persist their state-data as 
JSON files in a local file-system file-cache
"""
    ###################################
    # Class attributes/constants      #
    ###################################

    _file_store_dir = None
    _file_store_ready = False
    _loaded_objects = None

Where:

  • _file_store_dir is a default file system directory specification that will eventually need to be read from a configuration file in the ...

Get Hands-On Software Engineering with Python now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.