ANNOUNCE: Grouch 0.1

Greg Ward
Wed, 5 Sep 2001 11:22:26 -0400

Grouch 0.1

Grouch is a system for describing and enforcing a Python object schema.
That is, it provides you with a language for describing the intended
type signatures of your objects (collectively, the "object schema"), and
tools to walk an object graph, checking that every value found matches
your object schema.

In the current version, your object schema is described in
specially-formatted class docstrings.  (I have vague plans for a
standalone schema language but don't really have a need for it myself,
so haven't done any work in that direction.)  The gen_schema script
walks a directory tree looking for Python modules, parses any class
docstrings it finds, and writes the resulting (pickled) object schema to
a file.

The second phase is to type-check some existing data -- i.e. make sure
that every value in an object graph conforms to the object schema
extracted from your class docstrings.  This is done with the check_data
script, which knows about a couple of popular Python persistence
mechanisms (just ZODB and pickle so far).  If you just want to check an
object graph in memory, you'll have to write a few lines of code to take
the place of running check_data on a persistent object store (this is
not yet covered by the documentation).

[Grouch was pre-announced to the types-sig in late August when it was
 still called Oscar.  The only change is the name -- there are too many
 things called Oscar already in the world.]


Grouch requires Python 2.0 or greater, with Jeremy Hylton's "compiler"
package installed.  At least in Python 2.0 .. 2.1.1, this package is
included in Python's source distribution, but not installed as part of
the standard library.

Grouch also utilizes the SPARK parser framework by John Aycock; for your
convenience, a copy is included with Grouch.


Grouch was written by Greg Ward <>.  Includes
code (lib/ written by John Aycock, which is licensed

For the latest version, visit

Greg Ward - software developer      
MEMS Exchange