Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Database > Database APIs

    EasyDB 0.2

    Download button

    No screenshots available
    Downloads: 183  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Ben Dowling | More programs
    MIT/X Consortium Lic... / FREE
    March 4th, 2012, 08:10 GMT
    ROOT / Database / Database APIs

     Read user reviews (0)  Refer to a friend  Subscribe

    EasyDB description

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

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



    Product's homepage

    Requirements:

    · Python

      


    TAGS:

    SQLite wrapper | database manager | SQLite | wrapper | database

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM