EasyDB

Software Screenshot:
EasyDB
Software Details:
Version: 0.2
Upload Date: 14 Apr 15
Developer: Ben Dowling
Distribution Type: Freeware
Downloads: 158

Rating: 2.0/5 (Total Votes: 2)

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:

```python
from easydb import EasyDB
db = EasyDB('filename.db')
cursor = db.query("SELECT * FROM mytable")
```


New databases can be creating by specifying your schema as a dictionary, eg:

```python
schema = {
    'table_name': ['column_name column_type', …],
    'table_name': ['column_name column_type', …],
    'table_name': ['column_name column_type', …]
}
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:

```python
from easydb import EasyDB
db = EasyDb('my.db', {'users': ['username text', 'description text']})

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')
```

Requirements:

  • Python

Similar Software

friendlydb
friendlydb

14 Apr 15

sqlcmd
sqlcmd

11 May 15

DBKiss
DBKiss

11 May 15

pgintcl
pgintcl

11 May 15

Other Software of Developer Ben Dowling

pyradio
pyradio

20 Feb 15

Comments to EasyDB

Comments not found
Add Comment
Turn on images!