Created
September 19, 2020 15:32
-
-
Save schnipdip/29080ce8acf78440511cfd0506d72256 to your computer and use it in GitHub Desktop.
Inserting Objects to #Postgresql Database
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import psycopg2 | |
def insert_object(): | |
#Referece: Constructing #Postgresql connection obect | |
cursor.execute("""INSERT INTO TABLENAME(COLUMNS)\ | |
VALUES (%s)""",(OBJECT)) | |
conn.commit() | |
conn.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment