def size_on_disk ( self ) : return int ( self . connection . query ( """
            SELECT SUM(data_length + index_length)
            FROM information_schema.tables WHERE table_schema='{db}'
            """ . format ( db = self . database ) ) . fetchone ( ) [ 0 ] )
get length of table sqlite python
: return : size of the entire schema in bytes
def size_on_disk(self):
        """
        :return: size of the entire schema in bytes
        """
        return int(self.connection.query(
            """
            SELECT SUM(data_length + index_length)
            FROM information_schema.tables WHERE table_schema='{db}'
            """.format(db=self.database)).fetchone()[0])