platypush/plugins/esp/__init__.py
def db_items(self, dbfile: str, **kwargs) -> Dict[str, str]:
        """
        Get a key->value mapping of the items stored in a B-Tree file database.

        :param dbfile: Database file name.
        :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 = '''
import json
print(json.dumps({k.decode(): v.decode() for k, v in db.items()}))
'''

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

        Get a key->value mapping of the items stored in a B-Tree file database.

        :param dbfile: Database file name.
        :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.
        
Get a key->value mapping of the items stored in a B-Tree file database.
Get a key - > value mapping of the items stored in a B - Tree file database .
def db_items(self, dbfile: str, **kwargs) -> Dict[str, str]:
        code = '''
import json
print(json.dumps({k.decode(): v.decode() for k, v in db.items()}))
'''
        try:
            self.open_db(dbfile, **kwargs)
            return self.execute(code, **kwargs).output
        finally:
            self.close_db(dbfile, **kwargs)
def db_items ( self , dbfile : str , ** kwargs ) -> Dict [ str , str ] : code = '''
import json
print(json.dumps({k.decode(): v.decode() for k, v in db.items()}))
''' try : self . open_db ( dbfile , ** kwargs ) return self . execute ( code , ** kwargs ) . output finally : self . close_db ( dbfile , ** kwargs )
Get a key->value mapping of the items stored in a B-Tree file database.
Get a key - > value mapping of the items stored in a B - Tree file database .
"""
        Get a key->value mapping of the items stored in a B-Tree file database.

        :param dbfile: Database file name.
        :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 .
kwargs
Parameters to pass to :meth:`platypush.plugins.esp.EspPlugin.execute`.
Parameters to pass to : meth : ` platypush . plugins . esp . EspPlugin . execute ` .