"""
Definition of the DataStore interface to the stored memories.

S3DataStore implementation that stores memories in an S3 bucket.
"""

import datetime


class DataStore:
    """
    Abstract base class for memory data stores
    """

    def __init__(self):
        pass

    def list_memories(self, user_id, start_date=None, end_date=None):
        """
        Get a list of dates that contain memories for a user.
        :param user_id: the User ID
        :type user_id: str or unicode
        :param start_date: optional start date to clamp range to (inclusive)
        :type start_date: datetime.date
        :param end_date: datetime.date optional end date to clamp range to (inclusive)
        :type end_date: datetime.date
        :return: a list of datetime.date in ascending date order where memories exist.
        """
        raise NotImplementedError()

    def get_memory(self, user_id, memory_date):
        """
        :param user_id: str the User ID
        :type user_id: str or unicode
        :param memory_date:
        :type memory_date: datetime.date
        :return: The memory
        :raises MyDeticNoMemoryFound if there isn't a memory on this day
        """
        raise NotImplementedError()

    def has_memory(self, user_id, memory_date):
        """
        Return whether a memory exists for a user at a date.
        :param user_id:
        :type user_id: str or unicode
        :param memory_date:
        :type memory_date: datetime.date
        :return: True if a memory exists, false otherwise.
        """
        raise NotImplementedError()

    def add_memory(self, memory):
        """
        :param memory:
        :raises MyDeticMemoryAlreadyExists
        :return:
        """
        raise NotImplementedError()

    def update_memory(self, memory):
        raise NotImplementedError()

    def delete_memory(self, user_id, memory_date):
        raise NotImplementedError()
@@ -1,12 +1,10 @@
-%22%22%22%0A
+# 
 Definiti
@@ -57,17 +57,18 @@
 mories.%0A
-%0A
+# 
 S3DataSt
@@ -128,29 +128,8 @@
 et.%0A
-%22%22%22%0A%0Aimport datetime%0A
 %0A%0Acl
@@ -1785,87 +1785,564 @@
     
-raise NotImplementedError()%0A%0A    def delete_memory(self, user_id, memory_date):
+%22%22%22%0A        :param memory: updated MemoryData object. NOTE: only text is changed.%0A        :return: No return value%0A        :raises: MyDeticNoMemoryFound is memory doesn't already exist%0A        %22%22%22%0A        raise NotImplementedError()%0A%0A    def delete_memory(self, user_id, memory_date):%0A        %22%22%22%0A        :param user_id: str the User ID%0A        :type user_id: str or unicode%0A        :param memory_date:%0A        :type memory_date: datetime.date%0A        :return: The memory%0A        :raises MyDeticNoMemoryFound if there isn't a memory on this day%0A        %22%22%22
 %0A   
@@ -2353,28 +2353,29 @@
  raise NotImplementedError()
+%0A

add comments to datastore