Fin_Research / test.py
Robert Castagna
adding postgres db as well as fixing API endpoints -- 'yfinance' broke
1fce135
raw
history blame contribute delete
325 Bytes
import psycopg2
connection = psycopg2.connect(database="hf_fundamentals", user="postgres", password="4x?S3nR", host="localhost", port=5432)
cursor = connection.cursor()
cursor.execute("SELECT * FROM pg_catalog.pg_tables;")
# Fetch all rows from database
record = cursor.fetchall()
print("Data from Database:- ", record)