3 RĂ©ponses
+ 5
import sqlite3
database = sqlite3.connect("example.db")
db = database.cursor()
db.execute("CREATE TABLE table (col1 TEXT, col2 TEXT)")
db.execute("INSERT INTO table VALUES ('hello', 'world')")
database.commit()
print(db.execute("SELECT * FROM table").fetchall())
+ 3
Take a look at the SQLAlchemy module âșïž
+ 1
There's mysql connector libraries for python