platypush/plugins/esp/__init__.py
def db_set(self, dbfile: str, key: str, value: Any, **kwargs):
        """
        Set a value on an internal B-Tree file database.

        :param dbfile: Database file name.
        :param key: Key to set.
        :param value: Value to set.
        :param kwargs: Parameters to pass to :meth:`platypush.plugins.esp.EspPlugin.execute`.
        """
        code = '''
db[b'{key}'] = b'{value}'
db.flush()
'''.format(key=self.string_quote(key), value=self.string_quote(str(value)))

        try:
            self.open_db(dbfile, **kwargs)
            self.execute(code, **kwargs)
        finally:
            self.close_db(dbfile, **kwargs)

        Set a value on an internal B-Tree file database.

        :param dbfile: Database file name.
        :param key: Key to set.
        :param value: Value to set.
        :param kwargs: Parameters to pass to :meth:`platypush.plugins.esp.EspPlugin.execute`.
        
Set a value on an internal B-Tree file database.
Set a value on an internal B - Tree file database .
def db_set(self, dbfile: str, key: str, value: Any, **kwargs):
        code = '''
db[b'{key}'] = b'{value}'
db.flush()
'''.format(key=self.string_quote(key), value=self.string_quote(str(value)))
        try:
            self.open_db(dbfile, **kwargs)
            self.execute(code, **kwargs)
        finally:
            self.close_db(dbfile, **kwargs)
def db_set ( self , dbfile : str , key : str , value : Any , ** kwargs ) : code = '''
db[b'{key}'] = b'{value}'
db.flush()
''' . format ( key = self . string_quote ( key ) , value = self . string_quote ( str ( value ) ) ) try : self . open_db ( dbfile , ** kwargs ) self . execute ( code , ** kwargs ) finally : self . close_db ( dbfile , ** kwargs )
Set a value on an internal B-Tree file database.
Set a value on an internal B - Tree file database .
"""
        Set a value on an internal B-Tree file database.

        :param dbfile: Database file name.
        :param key: Key to set.
        :param value: Value to set.
        :param kwargs: Parameters to pass to :meth:`platypush.plugins.esp.EspPlugin.execute`.
        """
self
dbfile
str
Database file name.
Database file name .
key
str
Key to set.
Key to set .
value
Any
Value to set.
Value to set .
kwargs
Parameters to pass to :meth:`platypush.plugins.esp.EspPlugin.execute`.
Parameters to pass to : meth : ` platypush . plugins . esp . EspPlugin . execute ` .