[OAI-implementers] Compact repository code in Python
Hickey,Thom
hickey@oclc.org
Wed, 30 Jul 2003 12:30:53 -0400
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C356B7.F1D3F06F
Content-Type: text/plain;
charset="iso-8859-1"
After seeing how short an OAI client could be (our shortest version so far
is 42 lines of Python code), we thought it would be interesting to see how
much code it would take to support a validated OAI repository in Python. We
now have a version ( http://purl.oclc.org/hickey/2PageOAI
<http://purl.oclc.org/hickey/2PageOAI> ) that is 105 lines of code and fits
on two pages, including the rather lengthy copyright statement. It is
released under our open-source license and we are interested in comments and
improvements. It could be a practical server for static databases with less
than 100,000 records. Currently only oai_dc is supported, but sets,
resumption tokens, etc. are all there.
The program is self-contained, using the basic HTTP server and XML library
that comes with Python. We've modified the client script so that it creates
a file suitable for input to the repository code.
--Thom Hickey
--Jenny Toves
------_=_NextPart_001_01C356B7.F1D3F06F
Content-Type: text/html;
charset="iso-8859-1"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2600.0" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=759200116-30072003><FONT face=Arial size=2>After seeing how
short an OAI client could be (our shortest version so far is 42 lines of Python
code), we thought it would be interesting to see how much code it would
take to support a validated OAI repository in Python. We now have a
version (<A
href="http://purl.oclc.org/hickey/2PageOAI">http://purl.oclc.org/hickey/2PageOAI</A>)
that is 105 lines of code and fits on two pages, including the rather lengthy
copyright statement. It is released under our open-source license
and we are interested in comments and improvements. It could be a
practical server for static databases with less than 100,000 records.
Currently only oai_dc is supported, but sets, resumption tokens, etc. are all
there.</FONT></SPAN></DIV>
<DIV><SPAN class=759200116-30072003><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=759200116-30072003><FONT face=Arial size=2>The program is
self-contained, using the basic HTTP server and XML library that comes with
Python. We've modified the client script so that it creates a file
suitable for input to the repository code.</FONT></SPAN></DIV>
<DIV><SPAN class=759200116-30072003><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=759200116-30072003><FONT face=Arial size=2>--Thom
Hickey</FONT></SPAN></DIV>
<DIV><SPAN class=759200116-30072003><FONT face=Arial size=2>--Jenny
Toves</FONT></SPAN></DIV>
<DIV><SPAN class=759200116-30072003><FONT face=Arial
size=2></FONT></SPAN> </DIV></BODY></HTML>
------_=_NextPart_001_01C356B7.F1D3F06F--