Skip to content

aizquier/python-simple-sqlite-wrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Simple SQLite3 database wrapper.

Manuel Izquierdo aizquier@gmail.com 2015

A very simple python wrapper for working with sqlite3 databases that I wrote for some of my projects. Not absolutely perfect, but it does the job.

Usage:

Initialize DB object

from pssw.db import DB
mydb = DB('database_file.sqlite')

Query out data (results in dict data):

data = mydb.QueryOut('select * from table').commit()

Query in data

query = mydb.QueryIn(
  'insert into table (col1, col2, ... ,coln) values (?, ?, ... , ?)')

push as many fields as required...

query.push((val1, val2, ..., valn))
query.push((val1, val2, ..., valn))
...

finally commit all the data:

query.commit()

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages