ANN: PySQLite 0.2.0 Released
owensmk at earthlink.net
Sun Jun 2 20:36:51 EDT 2002
pysqlite - Extension module for SQLite databases.
A Python-DB API 2.0 compliant extension module that connects to
SQLite is a powerful, embedded relational database in a compact C
library. It supports a large subset of SQL92, multiple tables and indices,
transactions, and triggers. It has a simple C/C++ interface requiring only
three functions to perform queries. It has TCL bindings and an ODBC
driver. Sources are uncopyrighted and can be used for any purpose. More
information can be found at <http://www.hwaci.com/sw/sqlite/index.html>.
conn = sqlite.connect("db")
cursor = conn.cursor()
SQL = """ select category, family, genus, species
from calflora order by genus, species limit 10"""
for col in cursor.description:
print "\t %12s - %3s bytes" % (col, repr(col))
row = cursor.fetchone()
while row != None:
print "%14s, %15s, %19s, %8s, %25s" % tuple(row)
row = cursor.fetchone()
SQL = "insert into calflora (family,genus,species) values(%s,%s,%s)"
cursor.execute(SQL, ('itchus', 'ivious', 'posionious'))
Linux(source) and Windows (binary) downloads are available at
Gerhard Häring <haering_postgresql at gmx.de>
Michael Owens <mike at mikesclutter.com>
William Trenker <wtrenker at shaw.ca>
The following are changes and enhancements since the last release:
- Two new project members whose work has made this release.
- General code cleanup.
- Lots of bugfixes.
- Support for SQL NULL.
- Changed parameter quoting style from 'format' to nicer 'pyformat' style.
- Much better DB-API 2.0 compliance.
- Much improved documentation.
- A 'smart' result set class that allows the columns in a row to be accessed
by name (either dictionary-like or attribute-like) additional to list-like
- Reworked examples using the new features. One additional example for
mass-importing data from an XML file.
- Unicode support.
- SQLite is typeless. We added a possibility to overcome this limitation.
The types int, float, str and unicode are supported by default, but you
can add user-defined types.
- User-defined SQL functions and aggregates can be programmed in Python (!)
and registered to the connection.
- Better error handling and error messages.
- An extensive test suite.
- A homepage with preliminary documentation
- A users' mailing list.
- win32 binaries
More information about the Python-list