Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F120564358
Pyblio.Store-module.html
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Jul 5, 06:31
Size
11 KB
Mime Type
text/xml
Expires
Mon, Jul 7, 06:31 (2 d)
Engine
blob
Format
Raw Data
Handle
27203194
Attached To
R3596 pybliographer
Pyblio.Store-module.html
View Options
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Pyblio.Store</title>
<link rel="stylesheet" href="epydoc.css" type="text/css"></link>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- =========== START OF NAVBAR =========== -->
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
<tr valign="center">
<th class="navbar"> <a class="navbar" href="Pyblio-module.html">Home</a> </th>
<th class="navbar"> <a class="navbar" href="trees.html">Trees</a> </th>
<th class="navbar"> <a class="navbar" href="indices.html">Index</a> </th>
<th class="navbar"> <a class="navbar" href="help.html">Help</a> </th>
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center">
<p class="nomargin">
pybliographer 1.3.3
</p></th></tr></table>
</th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<font size="-1"><b class="breadcrumbs">
<a href="Pyblio-module.html">Package Pyblio</a> ::
Module Store
</b></font></br>
</td>
<td><table cellpadding="0" cellspacing="0">
<tr><td align="right"><font size="-2">[show private | <a href="../public/Pyblio.Store-module.html">hide private</a>]</font></td></tr>
<tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a> | <a href="Pyblio.Store-module.html" target="_top">no frames</a>]</font></td></tr>
</table></td>
</tr></table>
<!-- =========== START OF MODULE DESCRIPTION =========== -->
<h2 class="module">Module Pyblio.Store</h2>
<h1 class="heading">Overview</h1>
<p>Contains the base classes and interfaces used to define a database
of records.</p>
The databases can be managed in different <a
href="Pyblio.Stores-module.html" class="link"><code>physical
stores</code></a>. To create a new database, get a specific store
implementation with the <a href="Pyblio.Store-module.html#get"
class="link"><code>get</code></a> function, and call the provided <a
href="Pyblio.Stores.filestore-module.html#dbcreate"
class="link"><code>dbcreate</code></a> function:
<pre class="doctestblock">
<span class="py-src"><span class="py-prompt">>>> </span>db = get (<span class="py-string">'file'</span>).dbcreate (path, schema)</span></pre>
Once this is done, the database is ready to accept <a
href="Pyblio.Store.Record-class.html"
class="link"><code>records</code></a>:
<pre class="doctestblock">
<span class="py-src"><span class="py-prompt">>>> </span>record = Store.Record()
<span class="py-prompt">>>> </span>record.add(<span class="py-string">'title'</span>, u<span class="py-string">'my title'</span>, Attribute.Text)
<span class="py-prompt">>>> </span>key = db.add(record)</span></pre>
<hr/>
<p><b>See Also:</b> the <a href="Pyblio.Store.Database-class.html"
class="link"><code>Database</code></a> class to know what operations can
be performed on databases.
</p>
<!-- =========== START OF CLASSES =========== -->
<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="summary">
<th colspan="2">Classes</th></tr>
<tr><td width="15%">
<b><a href="Pyblio.Store.Database-class.html"><code>Database</code></a></b></td>
<td>A bibliographic database.</td></tr>
<tr><td width="15%">
<b><a href="Pyblio.Store.Key-class.html"><code>Key</code></a></b></td>
<td>A key that uniquely identifies a record in a database.</td></tr>
<tr><td width="15%">
<b><a href="Pyblio.Store.Record-class.html"><code>Record</code></a></b></td>
<td>A database record.</td></tr>
<tr><td width="15%">
<b><a href="Pyblio.Store.ResultSet-class.html"><code>ResultSet</code></a></b></td>
<td>A set of keys from the database.</td></tr>
<tr><td width="15%">
<b><a href="Pyblio.Store.ResultSetStore-class.html"><code>ResultSetStore</code></a></b></td>
<td>Interface to the stored result sets.</td></tr>
<tr><td width="15%">
<b><a href="Pyblio.Store.View-class.html"><code>View</code></a></b></td>
<td>A view of a Result Set represents the Result Set sorted according to a
specific criterion.</td></tr>
</table><br />
<!-- =========== START OF EXCEPTIONS =========== -->
<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="summary">
<th colspan="2">Exceptions</th></tr>
<tr><td width="15%">
<b><a href="Pyblio.Store.StoreError-class.html"><code>StoreError</code></a></b></td>
<td>Generic error occuring while accessing a database storage</td></tr>
</table><br />
<!-- =========== START OF FUNCTION SUMMARY =========== -->
<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="summary">
<th colspan="2">Function Summary</th></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
<td><code><span class="summary-sig"><a href="Pyblio.Store-module.html#get" class="summary-sig-name"><code>get</code></a>(<span class=summary-sig-arg>fmt</span>)</span></code>
<br />
Return the methods provided by a specific storage layer.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
<td><code><a name="modules"></a><span class="summary-sig"><span class="summary-sig-name">modules</span>()</span></code>
</td></tr>
</table><br />
<!-- =========== START OF VARIABLE SUMMARY =========== -->
<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="summary">
<th colspan="2">Variable Summary</th></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1"><code>dict</code></font></td>
<td><b><a href="../private/Pyblio.Store-module.html#_cache"><code>_cache</code></a></b> = <span title="{}"><code>{} </code>
</span></td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1"><code>str</code></font></td>
<td><b><a href="../private/Pyblio.Store-module.html#_dir"><code>_dir</code></a></b> = <span title="'/home/fred/devel/pyblio/1.3/Pyblio/Stores'"><code><span class="variable-quote">'</span>/home/fred/devel/pyblio/1.3/Pyblio/Stores<span class="variable-quote">'</span> </code>
</span></td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1"><code>dict</code></font></td>
<td><b><a href="../private/Pyblio.Store-module.html#_modules"><code>_modules</code></a></b> = <span title="{'bsddb': 'bsddbstore', 'file': 'filestore', 'memory': 'memorystore'}"><code>{'bsddb': 'bsddbstore', 'file': 'filestore', <span class="variable-ellipsis">...</span></code>
</span></td></tr>
</table><br />
<!-- =========== START OF FUNCTION DETAILS =========== -->
<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="details">
<th colspan="2">Function Details</th></tr>
</table>
<a name="get"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
<h3><span class="sig"><span class="sig-name">get</span>(<span class=sig-arg>fmt</span>)</span>
</h3>
<p>Return the methods provided by a specific storage layer.</p>
For instance:
<pre class="doctestblock">
<span class="py-src"><span class="py-prompt">>>> </span>fmt = get (<span class="py-string">'file'</span>)
<span class="py-prompt">>>> </span>db = fmt.dbopen (...)</span></pre>
The methods are:
<ul>
<li>
dbcreate (file, schema): create a new database
</li>
<li>
dbopen (file): open a database in the specific store
</li>
<li>
dbimport (file): import an XML database into the specific
store
</li>
<li>
dbdestroy (file): destroy a database
</li>
</ul>
For more information, consult the documentation for the specific
backends, <a href="Pyblio.Stores.filestore-module.html"
class="link"><code>Pyblio.Stores.filestore</code></a>, <a
href="Pyblio.Stores.bsddbstore-module.html"
class="link"><code>Pyblio.Stores.bsddbstore</code></a> and <a
href="Pyblio.Stores.memorystore-module.html"
class="link"><code>Pyblio.Stores.memorystore</code></a>.
<dl><dt></dt><dd>
</dd></dl>
</td></tr></table>
<br />
<!-- =========== START OF VARIABLE DETAILS =========== -->
<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="details">
<th colspan="2">Variable Details</th></tr>
</table>
<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
<a name="_cache"></a>
<h3>_cache</h3>
<dl>
<dt></dt>
<dd>
<dl>
<dt><b>Type:</b></dt>
<dd>
<code>dict</code>
</dd>
<span title="{}"> <dt><b>Value:</b></dt>
<dd><table><tr><td>
<pre class="variable">
{} </pre>
</td></tr></table></dd>
</span> </dl>
</dd>
</dl></td></tr></table>
<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
<a name="_dir"></a>
<h3>_dir</h3>
<dl>
<dt></dt>
<dd>
<dl>
<dt><b>Type:</b></dt>
<dd>
<code>str</code>
</dd>
<span title="'/home/fred/devel/pyblio/1.3/Pyblio/Stores'"> <dt><b>Value:</b></dt>
<dd><table><tr><td>
<pre class="variable">
<span class="variable-quote">'</span>/home/fred/devel/pyblio/1.3/Pyblio/Stores<span class="variable-quote">'</span> </pre>
</td></tr></table></dd>
</span> </dl>
</dd>
</dl></td></tr></table>
<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
<a name="_modules"></a>
<h3>_modules</h3>
<dl>
<dt></dt>
<dd>
<dl>
<dt><b>Type:</b></dt>
<dd>
<code>dict</code>
</dd>
<span title="{'bsddb': 'bsddbstore', 'file': 'filestore', 'memory': 'memorystore'}"> <dt><b>Value:</b></dt>
<dd><table><tr><td>
<pre class="variable">
{'bsddb': 'bsddbstore', 'file': 'filestore', 'memory': 'memorystore'} </pre>
</td></tr></table></dd>
</span> </dl>
</dd>
</dl></td></tr></table>
<br />
<!-- =========== START OF NAVBAR =========== -->
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
<tr valign="center">
<th class="navbar"> <a class="navbar" href="Pyblio-module.html">Home</a> </th>
<th class="navbar"> <a class="navbar" href="trees.html">Trees</a> </th>
<th class="navbar"> <a class="navbar" href="indices.html">Index</a> </th>
<th class="navbar"> <a class="navbar" href="help.html">Help</a> </th>
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center">
<p class="nomargin">
pybliographer 1.3.3
</p></th></tr></table>
</th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left"><font size="-2">Generated by Epydoc 2.1 on Sun Sep 24 23:52:44 2006</font></td>
<td align="right"><a href="http://epydoc.sourceforge.net"
><font size="-2">http://epydoc.sf.net</font></a></td>
</tr>
</table>
</body>
</html>
Event Timeline
Log In to Comment