Sqlib is a wrapper for a simple handling of sqlite3 databases, so you don't have to use sqlite statements anymore. You can easily handle your database by instances of the tables.
Sqlib doesn't provide full sqlite possibilities and it can only be used for one database.
from sqlib import *
connect("company.db") # set db file (default is ':memory:')
employees = Table('employees') # create an instance for your table
employees.insert({'firstname': 'Linus', 'lastname': 'Bartsch'}) # manage the data easy without sqlite
employees.get('id', 1337)
Receive dictionaries instead of tuples:
{"id": 1337, "firstname": "Linus", "lastname": "Bartsch"}
employee.get('lastname', 'Johnson', fetch='all', only_column='firstname') # 'fetch' can also be an integer
['John', 'Jake']
employees.get_all() # you could also use the 'only_column' parameter here
[{"id": "1", "firstname": "Chuck", "lastname": "Norris"}, {"id": "42", "firstname": "John", "lastname": "Johnson"}, {"id": "1337", "firstname": "Linus", "lastname": "Bartsch"}, {"id": "9001", "firstname": "Jake", "lastname": "Johnson"}]
employees.update('id', 1337, {'lastname': 'Torvalds'})
employees.delete('id', 1337)
create_table("customers",
Column("firstname", TEXT, not_null=True),
Column("lastname", TEXT, not_null=True),
Column("email", TEXT, not_null=True, unique=True),
Column("prime_member", INTEGER, default=0),
Column("delivery_address", TEXT)
)