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

        :param dbfile: Database file name.
        :param key: Key to set.
        :param kwargs: Parameters to pass to :meth:`platypush.plugins.esp.EspPlugin.execute`.
        :return: Whichever value is stored as output, or null if the key doesn't exist.
        """
        code = '''
try:
    print(db[b'{key}'].decode())
except KeyError:
    pass
'''.format(key=self.string_quote(key))

        try:
            self.open_db(dbfile, **kwargs)
            response = self.execute(code, **kwargs)
            return response
        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 kwargs: Parameters to pass to :meth:`platypush.plugins.esp.EspPlugin.execute`.
        :return: Whichever value is stored as output, or null if the key doesn't exist.
        
Set a value on an internal B-Tree file database.
Set a value on an internal B - Tree file database .
def db_get(self, dbfile: str, key: str, **kwargs) -> Any:
        code = '''
try:
    print(db[b'{key}'].decode())
except KeyError:
    pass
'''.format(key=self.string_quote(key))
        try:
            self.open_db(dbfile, **kwargs)
            response = self.execute(code, **kwargs)
            return response
        finally:
            self.close_db(dbfile, **kwargs)
def db_get ( self , dbfile : str , key : str , ** kwargs ) -> Any : code = '''
try:
    print(db[b'{key}'].decode())
except KeyError:
    pass
''' . format ( key = self . string_quote ( key ) ) try : self . open_db ( dbfile , ** kwargs ) response = self . execute ( code , ** kwargs ) return response 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 kwargs: Parameters to pass to :meth:`platypush.plugins.esp.EspPlugin.execute`.
        :return: Whichever value is stored as output, or null if the key doesn't exist.
        """
Whichever value is stored as output, or null if the key doesn't exist.
Whichever value is stored as output or null if the key doesn ' t exist .
self
dbfile
str
Database file name.
Database file name .
key
str
Key to set.
Key to set .
kwargs
Parameters to pass to :meth:`platypush.plugins.esp.EspPlugin.execute`.
Parameters to pass to : meth : ` platypush . plugins . esp . EspPlugin . execute ` .