def __setitem__(self, key, value):
        """Get metadata from the DB"""
        if isinstance(value, bytes):
            value = value.decode('utf-8')
        self._conn.execute('INSERT OR REPLACE INTO metadata '
                           '(key, value) VALUES (?, ?)',
                           (key, value)).fetchone()
        self._conn.commit()
def __setitem__ ( self , key , value ) : if isinstance ( value , bytes ) : value = value . decode ( 'utf-8' ) self . _conn . execute ( 'INSERT OR REPLACE INTO metadata ' '(key, value) VALUES (?, ?)' , ( key , value ) ) . fetchone ( ) self . _conn . commit ( )
Get metadata from the DB