sqlitesample
It's exactly that, a sample of common DB operations in Python against sqlite.
- Delete database
- Create connection (which will create a db if it doesn't exit)
- Close connection
- Create connection (prove that it will open when db already exists)
- Create tables
- Insert
- Read all
- Read by key
- Update
- Delete
- Commit and close
Credits
Most (all?) the code here has been pulled from various sources and tested.
http://www.sqlitetutorial.net/sqlite-python
main_db.py
This is a python class that encapulates all the above into a.... python class. This class is not generic but implementation specific which makes this a sample template.