import psycopg2
my_variable = 142.15
conn = psycopg2.connect("dbname='kurs' user='dbuser' host='localhost' password='dbpass'")
cur = conn.cursor()
cur.execute("INSERT INTO kurs_table(kurs_now) VALUES (%s)" % my_variable)
conn.commit()
cur.close()
conn.close()