Skip to content

Instantly share code, notes, and snippets.

@mcescalante
Created December 4, 2017 02:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mcescalante/802719af6b3b13a707f39b4f8704d0e8 to your computer and use it in GitHub Desktop.
Save mcescalante/802719af6b3b13a707f39b4f8704d0e8 to your computer and use it in GitHub Desktop.
import sqlite3
import json
conn = sqlite3.connect('test.db')
c = conn.cursor()
# Insert {'test':'test2'} dummy values into database
c.execute('''insert into data values(?)''',(json.dumps({'test':'test2'}),))
conn.commit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment