You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
415 B
Python

2 years ago
import sqlite3
connection = sqlite3.connect('database.db')
with open('schema.sql') as f:
connection.executescript(f.read())
cur = connection.cursor()
cur.execute(
"INSERT INTO instruments (name, slug, description, panel) VALUES (?, ?, ?, ?)",
('Test Instrument', 'test_instrument', 'The classic original the one we like to test', 'test_instrument.svg')
)
connection.commit()
connection.close()