Tag: Python

Akses PosgreSQL dengan Python

Install paket [email protected]:~$ conda activate(base) [email protected]:~$ conda install -c anaconda psycopg2 Buat script untuk akses ke PostgreSQLimport psycopg2 # Establishing the connection.conn = psycopg2.connect( database=”postgres”, user=’postgres’, password=’password’, host=’localhost’, port= ‘5432’) # Creating a cursor object using the cursor() method.cursor = conn.cursor() Executing…Read More »