[DB-SIG] Announcement: DB-API code fragment library

Thomas Bryan tbryan@arlut.utexas.edu
Thu, 29 Jul 1999 09:09:48 -0500 (CDT)

On Wed, 21 Jul 1999, Brad Stec wrote:

> I'll see what I can do.
> -----Original Message-----
> Brad Stec wrote:
> > 
> > I'm putting in some examples of the various SQL commands and ways to 
> > get
> Could you put the examples on web-pages ? That way Andrew could link
> to it from the database topics guide on www.python.org.

I don't know whether this idea will really take off, but I hope it does.
I've set up a Python Database Code Fragment Library using the FAQ Wizard.


My Goal: 
The Python DB-API Code Fragment Library will act as a repository for code
fragments (short and long) showing how to use a DB-API compliant database
extension.  It will also act as a repository for code showing the quirks
and exceptions when using specific databases and their extensions.  This
code library is maintained by its users.  That is, if you want to add an
example, please do!  If you find and entry that no longer works, fix it.

Section 1. general info about Python, the DB-API, 
Section 2. generic code for all DB-API compliant databases/modules;
 hopefully the largest section some day, code in this section should 
 work with any Python interface that has fully implemented the spec
Section 3+. specific info about using various databases from Python.
 The first entry is always general info about options for accessing 
 the database from Python (ODBC, one or more extension modules, etc.).
 The following entries should show code that illustrates that database's 
 quirks/deviations from the API or the quirks/deviations of specific 
 extension modules for using that database.

I decided to organize the sections by databaes instead of by python
extension module.  I thought that a DB user would find it easier to locate
the information that he needs that way.  I reserved section one for
non-code stuff...just info about the code library and such.  I also
reserved the first entry of every section for some info about using a
specific database with python (which modules are available, from where,

Please add code, modify code, make the code library grow, send me
suggestions (at tbryan@python.net), and generally just get excited about
databases and Python for a few weeks.  A few weeks of fervor followed by a
long idle period where we all neglect the library still leaves a nice
library for newbies to steal code from. :)

The password for changes is:

Finally, thanks to Brad Stec for volunteering to create some sample code
for MySQL in the first place and thanks to M.-A. Lemburg for suggesting
that the code be posted to the web.  I just thought that instead of
creating a place for Brad to post his code, I'd solve the more general
problem. :)

And now for something completely different.

Tom Bryan
Applied Research Laboratories
University of Texas at Austin