EasyDB

SQLite wrapper that makes it easier to create and manage your DB
Download

EasyDB Ranking & Summary

Advertisement

  • Rating:
  • License:
  • MIT/X Consortium Lic...
  • Price:
  • FREE
  • Publisher Name:
  • Ben Dowling
  • Publisher web site:
  • https://github.com/coderholic/

EasyDB Tags


EasyDB Description

easydb is a really simple **SQLite wrapper** for that saves you from having to worry about creating tables or managing connections.It can be used on existing SQLite database by simply passing in the database filename:```pythonfrom easydb import EasyDBdb = EasyDB('filename.db')cursor = db.query("SELECT * FROM mytable")```New databases can be creating by specifying your schema as a dictionary, eg:```pythonschema = { 'table_name': , 'table_name': , 'table_name': }db = EasyDB('filename.db', schema)```If the database file already exists then the schema won't be updated, but if it doesn't exist then it'll be created with the given schema. Here's a full example:```pythonfrom easydb import EasyDBdb = EasyDb('my.db', {'users': })db.query("INSERT INTO users (username, description) VALUES (?, ?)", ('ben', 'some sort of description'))for result in db.query("SELECT * FROM users"): print result# => ('ben', 'some sort of description')```Product's homepage


EasyDB Related Software