Skip to content

Latest commit

 

History

History
25 lines (19 loc) · 661 Bytes

README.md

File metadata and controls

25 lines (19 loc) · 661 Bytes

Python Driver for CrossDB

Pre-requirement

You need to install crossdb lib first

Import

It's a single python file lib, you can just include in your project folder and import directly, or you can install to python.

python setup.py install

Example

import crossdb

conn = crossdb.connect(database=":memory:")
cursor = conn.cursor()
cursor.execute("CREATE TABLE student (name CHAR(16), age INT, class CHAR(16))")
cursor.execute("INSERT INTO student (name,age,class) VALUES ('jack',10,'3-1'), ('tom',11,'2-5')")
cursor.execute("SELECT * from student")
for row in cursor:
	print (row)