Skip to content

Instantly share code, notes, and snippets.

@fegvilela
Created July 21, 2025 21:42
Show Gist options
  • Save fegvilela/330a5b77d00c59c706277127f98e0063 to your computer and use it in GitHub Desktop.
Save fegvilela/330a5b77d00c59c706277127f98e0063 to your computer and use it in GitHub Desktop.
exemplo_conexao_pg.py
import psycopg2
import pandas as pd
conn = psycopg2.connect(
host="db.enqnykbniduvcnlronlk.supabase.co",
database="postgres",
user="postgres",
password="[YOUR-PASSWORD]",
port=5432
)
df = pd.read_sql("SELECT * FROM sua_tabela", conn)
conn.close()
@fegvilela
Copy link
Author

python3 -m venv .venv && source .venv/bin/activate && pip install pip --upgrade && source .venv/bin/activate && pip install pandas psycopg2-binary 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment