Page MenuHomec4science

Pyblio.Store-module.html
No OneTemporary

File Metadata

Created
Fri, Jul 4, 02:01

Pyblio.Store-module.html

<?xml version="1.0" encoding="ascii"?>
<!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" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="Pyblio-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Project homepage -->
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
>pyblio-core 1.3.4</th>
</tr></table></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="Pyblio-module.html">Package&nbsp;Pyblio</a> ::
Module&nbsp;Store
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>]&nbsp;|&nbsp;<a href="Pyblio.Store-module.html"
target="_top">no&nbsp;frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module Store</h1><span class="codelink"><a href="Pyblio.Store-pysrc.html">source&nbsp;code</a></span><br /><br />
<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">physical stores</a>. To
create a new database, get a specific store implementation with the <a
href="Pyblio.Store-module.html#get" class="link">get</a> function, and
call the provided <a
href="Pyblio.Stores.filestore-module.html#dbcreate"
class="link">dbcreate</a> function:
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>db = <span class="py-builtin">get</span> (<span class="py-string">'file'</span>).dbcreate (path, schema)</pre>
Once this is done, the database is ready to accept <a
href="Pyblio.Store.Record-class.html" class="link">records</a>:
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>record = Store.Record()
<span class="py-prompt">&gt;&gt;&gt; </span>record.add(<span class="py-string">'title'</span>, u<span class="py-string">'my title'</span>, Attribute.Text)
<span class="py-prompt">&gt;&gt;&gt; </span>key = db.add(record)</pre><br /><br />
<hr />
<div class="fields"> <p><strong>See Also:</strong>
the <a href="Pyblio.Store.Database-class.html"
class="link">Database</a> class to know what operations can be
performed on databases.
</p>
</div><!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Classes</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Classes"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a href="Pyblio.Store.StoreError-class.html" class="summary-name">StoreError</a><br />
Generic error occuring while accessing a database storage
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a href="Pyblio.Store.Key-class.html" class="summary-name">Key</a><br />
A key that uniquely identifies a record in a database.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a href="Pyblio.Store.Record-class.html" class="summary-name">Record</a><br />
A database record.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a href="Pyblio.Store.View-class.html" class="summary-name">View</a><br />
A view of a Result Set represents the Result Set sorted
according to a specific criterion.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a href="Pyblio.Store.ResultSet-class.html" class="summary-name">ResultSet</a><br />
A set of keys from the database.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a href="Pyblio.Store.ResultSetStore-class.html" class="summary-name">ResultSetStore</a><br />
Interface to the stored result sets.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a href="Pyblio.Store.Database-class.html" class="summary-name">Database</a><br />
A bibliographic database.
</td>
</tr>
</table>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Functions</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Functions"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="Pyblio.Store-module.html#get" class="summary-sig-name">get</a>(<span class="summary-sig-arg">fmt</span>)</span><br />
Return the methods provided by a specific storage layer.</td>
<td align="right" valign="top">
<span class="codelink"><a href="Pyblio.Store-pysrc.html#get">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="modules"></a><span class="summary-sig-name">modules</span>()</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="Pyblio.Store-pysrc.html#modules">source&nbsp;code</a></span>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Variables</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Variables"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="_dir"></a><span class="summary-name">_dir</span> = <code title="'/home/fred/devel/pyblio/1.3/core/Pyblio/Stores'"><code class="variable-quote">'</code><code class="variable-string">/home/fred/devel/pyblio/1.3/core/Pyblio/Stores</code><code class="variable-quote">'</code></code>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a href="Pyblio.Store-module.html#_modules" class="summary-name">_modules</a> = <code title="{'bsddb': 'bsddbstore', 'file': 'filestore', 'memory': 'memorystore'}"><code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">bsddb</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">bsddbstore</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">file</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">filestore</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">memor</code><code class="variable-ellipsis">...</code></code>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="_cache"></a><span class="summary-name">_cache</span> = <code title="{}"><code class="variable-group">{</code><code class="variable-group">}</code></code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="ext"></a><span class="summary-name">ext</span> = <code title="'.pyc'"><code class="variable-quote">'</code><code class="variable-string">.pyc</code><code class="variable-quote">'</code></code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a href="Pyblio.Store-module.html#full" class="summary-name">full</a> = <code title="'/home/fred/devel/pyblio/1.3/core/Pyblio/Stores/__init__.pyc'"><code class="variable-quote">'</code><code class="variable-string">/home/fred/devel/pyblio/1.3/core/Pyblio/Stores/__init_</code><code class="variable-ellipsis">...</code></code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="m"></a><span class="summary-name">m</span> = <code title="'__init__'"><code class="variable-quote">'</code><code class="variable-string">__init__</code><code class="variable-quote">'</code></code>
</td>
</tr>
</table>
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Function Details</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-FunctionDetails"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
</table>
<a name="get"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">get</span>(<span class="sig-arg">fmt</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="Pyblio.Store-pysrc.html#get">source&nbsp;code</a></span>&nbsp;
</td>
</table>
<p>Return the methods provided by a specific storage layer.</p>
For instance:
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>fmt = <span class="py-builtin">get</span> (<span class="py-string">'file'</span>)
<span class="py-prompt">&gt;&gt;&gt; </span>db = fmt.dbopen (...)</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">Pyblio.Stores.filestore</a>, <a
href="Pyblio.Stores.bsddbstore-module.html"
class="link">Pyblio.Stores.bsddbstore</a> and <a
href="Pyblio.Stores.memorystore-module.html"
class="link">Pyblio.Stores.memorystore</a>.
<dl class="fields">
</dl>
</td></tr></table>
</div>
<br />
<!-- ==================== VARIABLES DETAILS ==================== -->
<a name="section-VariablesDetails"></a>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Variables Details</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-VariablesDetails"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
</table>
<a name="_modules"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<h3 class="epydoc">_modules</h3>
<dl class="fields">
</dl>
<dl class="fields">
<dt>Value:</dt>
<dd><table><tr><td><pre class="variable">
<code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">bsddb</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">bsddbstore</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">file</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">filestore</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">memory</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">memorystore</code><code class="variable-quote">'</code><code class="variable-group">}</code>
</pre></td></tr></table>
</dd>
</dl>
</td></tr></table>
</div>
<a name="full"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<h3 class="epydoc">full</h3>
<dl class="fields">
</dl>
<dl class="fields">
<dt>Value:</dt>
<dd><table><tr><td><pre class="variable">
<code class="variable-quote">'</code><code class="variable-string">/home/fred/devel/pyblio/1.3/core/Pyblio/Stores/__init__.pyc</code><code class="variable-quote">'</code>
</pre></td></tr></table>
</dd>
</dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="Pyblio-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Project homepage -->
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
>pyblio-core 1.3.4</th>
</tr></table></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0beta1 on Thu Sep 13 21:54:19 2007
</td>
<td align="right" class="footer">
<a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie()
// -->
</script>
</body>
</html>

Event Timeline