Related Entries

India PyCon 2009
Quick wallpaper changer
Load testing with Grinder
Adding namespace to XML
Opera RSS to OPML

« Joy of python: dir, help and pprint
» Pythoning with Eclipse

SQLite and Python

I wonder why I never tried these out before. Super fast and super easy.

Today, I spent some time with cx_Oracle library for Python. After I got back home, I thought I’ll try SQLite - I had made a note about that last month. There is also a PySQLite, to use SQLite from Python.

What can I say? One word. Fast. Terrific performance for most tasks you need to do for medium size datasets.

Installation in Linux is pretty straight-forward.

  1. Install python-devel packages
  2. Install SQLite and SQLite-devel RPM’s from the SQLite site
  3. Download pysqlite, extract it and install it:
    python setup.py build
    python setup.py install
    

If I get time, I’m going to see if this can be used with SQLObject and other Object Relational Mappers.

Even without python, SQLite is simply superb. The command line interface (sqlite) is more than enough to interface with the database. Adventurous souls might want to try ODBC driver and OpenOffice (PDF) to have a nice GUI.

Or simply extend the PythonCard sample, dbBrowser to support SQLite. wxWindows has a Grid component. So, may be it is easy enough to make a front-end like MS-Access?

  1. I can't remember how I was put onto sqlite, but as soon as I'd made a Roundup backend for it, I knew it was cool. The benchmarks had it up there with metakit (which IMHO is significantly less easy to understand _and_ install).

    Setup "build" and "install" can be done in the one "install" step, BTW :)

    Posted by: Richard Jones on February 13, 2003 09:20 PM
  2. Wah. hyperlinks are removed from comments :(

    Posted by: Richard Jones on February 13, 2003 09:21 PM
  3. I had to take out hrefs from comments. There were too many comment spammers adding links to their marketing sites.

    Posted by: Babu on February 13, 2003 09:58 PM
  4. PySQLite is good, fast and easy to use. For Oracle access from Python take a look at DCOracle2. I have moved to it from cx_Oracle as it is faster, more stable and more functional. cx_Oracle is a great lightweight Oracle access module but in most cases is outgunned by DCOracle2.

    Posted by: Andy Todd on February 14, 2003 04:04 AM
  5. iSQL Viewer is a nice java frontend for sql databases. Works with sqlite as well.

    Posted by: Mitja on July 9, 2004 03:57 PM
//-->