def __init__(self, path, create_dirs=False, encoding=None, **kwargs):
        """
        Create a new instance.

        Also creates the storage file, if it doesn't exist.

        :param path: Where to store the JSON data.
        :type path: str
        """

        super(JSONStorage, self).__init__()
        touch(path, create_dirs=create_dirs)  # Create file if not exists
        self.kwargs = kwargs
        self._handle = codecs.open(path, 'r+', encoding=encoding)
def __init__ ( self , path , create_dirs = False , encoding = None , ** kwargs ) : super ( JSONStorage , self ) . __init__ ( ) touch ( path , create_dirs = create_dirs ) self . kwargs = kwargs self . _handle = codecs . open ( path , 'r+' , encoding = encoding )
Create a new instance.

        Also creates the storage file, if it doesn't exist.

        :param path: Where to store the JSON data.
        :type path: str