INNER CODE UNIT · Python

peep_db

evangelosmeklis/peepdb · peepdb/core.py:56

def peep_db(db_type: str,
            host: str,
            user: str,
            password: str,
            database: str,
            table: str = None,
            format: str = 'table',
            page: int = 1,
            page_size: int = 100,
            scientific: bool = False,
            trusted: bool = False) -> Any:
    print(f"peep_db called with: db_type={db_type}, host={host}, database={database}, table={table}, scientific={scientific}, trusted={trusted}")
    db = connect_to_database(db_type, host, user, password, database, trusted=trusted)
    db.connect()
    try:
        if table:
            print(f"Fetching data for table: {table}")
            result = {table: db.fetch_data(table, page, page_size)}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…