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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.