36d91dd0b3
I like it because it doesn't allow the text to fill horizontally over the entire screen.
152 lines
No EOL
9.4 KiB
HTML
152 lines
No EOL
9.4 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
|
|
<title>accounting.storage — Accounting API 0.1-beta documentation</title>
|
|
|
|
<link rel="stylesheet" href="../../_static/flasky.css" type="text/css" />
|
|
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
|
|
|
|
<script type="text/javascript">
|
|
var DOCUMENTATION_OPTIONS = {
|
|
URL_ROOT: '../../',
|
|
VERSION: '0.1-beta',
|
|
COLLAPSE_INDEX: false,
|
|
FILE_SUFFIX: '.html',
|
|
HAS_SOURCE: true
|
|
};
|
|
</script>
|
|
<script type="text/javascript" src="../../_static/jquery.js"></script>
|
|
<script type="text/javascript" src="../../_static/underscore.js"></script>
|
|
<script type="text/javascript" src="../../_static/doctools.js"></script>
|
|
<link rel="top" title="Accounting API 0.1-beta documentation" href="../../index.html" />
|
|
<link rel="up" title="Module code" href="../index.html" />
|
|
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
|
|
|
|
</head>
|
|
<body>
|
|
|
|
|
|
|
|
<div class="related">
|
|
<h3>Navigation</h3>
|
|
<ul>
|
|
<li class="right" style="margin-right: 10px">
|
|
<a href="../../genindex.html" title="General Index"
|
|
accesskey="I">index</a></li>
|
|
<li class="right" >
|
|
<a href="../../http-routingtable.html" title="HTTP Routing Table"
|
|
>routing table</a> |</li>
|
|
<li class="right" >
|
|
<a href="../../py-modindex.html" title="Python Module Index"
|
|
>modules</a> |</li>
|
|
<li><a href="../../index.html">Accounting API 0.1-beta documentation</a> »</li>
|
|
<li><a href="../index.html" accesskey="U">Module code</a> »</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="document">
|
|
<div class="documentwrapper">
|
|
<div class="bodywrapper">
|
|
<div class="body">
|
|
|
|
<h1>Source code for accounting.storage</h1><div class="highlight"><pre>
|
|
<span class="c"># Part of accounting-api project:</span>
|
|
<span class="c"># https://gitorious.org/conservancy/accounting-api</span>
|
|
<span class="c"># License: AGPLv3-or-later</span>
|
|
|
|
<span class="kn">from</span> <span class="nn">abc</span> <span class="kn">import</span> <span class="n">ABCMeta</span><span class="p">,</span> <span class="n">abstractmethod</span>
|
|
|
|
<span class="kn">from</span> <span class="nn">accounting.exceptions</span> <span class="kn">import</span> <span class="n">AccountingException</span>
|
|
|
|
|
|
<div class="viewcode-block" id="Storage"><a class="viewcode-back" href="../../api/accounting.storage.html#accounting.storage.Storage">[docs]</a><span class="k">class</span> <span class="nc">Storage</span><span class="p">:</span>
|
|
<span class="sd">'''</span>
|
|
<span class="sd"> ABC for accounting storage</span>
|
|
<span class="sd"> '''</span>
|
|
<span class="n">__metaclass__</span> <span class="o">=</span> <span class="n">ABCMeta</span>
|
|
|
|
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kw</span><span class="p">):</span>
|
|
<span class="k">pass</span>
|
|
|
|
<span class="nd">@abstractmethod</span>
|
|
<div class="viewcode-block" id="Storage.get_transactions"><a class="viewcode-back" href="../../api/accounting.storage.html#accounting.storage.Storage.get_transactions">[docs]</a> <span class="k">def</span> <span class="nf">get_transactions</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kw</span><span class="p">):</span>
|
|
<span class="k">raise</span> <span class="ne">NotImplementedError</span>
|
|
</div>
|
|
<span class="nd">@abstractmethod</span>
|
|
<div class="viewcode-block" id="Storage.get_transaction"><a class="viewcode-back" href="../../api/accounting.storage.html#accounting.storage.Storage.get_transaction">[docs]</a> <span class="k">def</span> <span class="nf">get_transaction</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kw</span><span class="p">):</span>
|
|
<span class="k">raise</span> <span class="ne">NotImplementedError</span>
|
|
</div>
|
|
<span class="nd">@abstractmethod</span>
|
|
<div class="viewcode-block" id="Storage.get_account"><a class="viewcode-back" href="../../api/accounting.storage.html#accounting.storage.Storage.get_account">[docs]</a> <span class="k">def</span> <span class="nf">get_account</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kw</span><span class="p">):</span>
|
|
<span class="k">raise</span> <span class="ne">NotImplementedError</span>
|
|
</div>
|
|
<span class="nd">@abstractmethod</span>
|
|
<div class="viewcode-block" id="Storage.get_accounts"><a class="viewcode-back" href="../../api/accounting.storage.html#accounting.storage.Storage.get_accounts">[docs]</a> <span class="k">def</span> <span class="nf">get_accounts</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kw</span><span class="p">):</span>
|
|
<span class="k">raise</span> <span class="ne">NotImplementedError</span>
|
|
</div>
|
|
<span class="nd">@abstractmethod</span>
|
|
<div class="viewcode-block" id="Storage.add_transaction"><a class="viewcode-back" href="../../api/accounting.storage.html#accounting.storage.Storage.add_transaction">[docs]</a> <span class="k">def</span> <span class="nf">add_transaction</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">transaction</span><span class="p">):</span>
|
|
<span class="k">raise</span> <span class="ne">NotImplementedError</span>
|
|
</div>
|
|
<span class="nd">@abstractmethod</span>
|
|
<div class="viewcode-block" id="Storage.update_transaction"><a class="viewcode-back" href="../../api/accounting.storage.html#accounting.storage.Storage.update_transaction">[docs]</a> <span class="k">def</span> <span class="nf">update_transaction</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">transaction</span><span class="p">):</span>
|
|
<span class="k">raise</span> <span class="ne">NotImplementedError</span>
|
|
</div>
|
|
<span class="nd">@abstractmethod</span>
|
|
<div class="viewcode-block" id="Storage.delete_transaction"><a class="viewcode-back" href="../../api/accounting.storage.html#accounting.storage.Storage.delete_transaction">[docs]</a> <span class="k">def</span> <span class="nf">delete_transaction</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">transaction_id</span><span class="p">):</span>
|
|
<span class="k">raise</span> <span class="ne">NotImplementedError</span>
|
|
</div>
|
|
<span class="nd">@abstractmethod</span>
|
|
<div class="viewcode-block" id="Storage.reverse_transaction"><a class="viewcode-back" href="../../api/accounting.storage.html#accounting.storage.Storage.reverse_transaction">[docs]</a> <span class="k">def</span> <span class="nf">reverse_transaction</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">transaction_id</span><span class="p">):</span>
|
|
<span class="k">raise</span> <span class="ne">NotImplementedError</span>
|
|
|
|
</div></div>
|
|
<div class="viewcode-block" id="TransactionNotFound"><a class="viewcode-back" href="../../api/accounting.storage.html#accounting.storage.TransactionNotFound">[docs]</a><span class="k">class</span> <span class="nc">TransactionNotFound</span><span class="p">(</span><span class="n">AccountingException</span><span class="p">):</span>
|
|
<span class="k">pass</span></div>
|
|
</pre></div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="sphinxsidebar">
|
|
<div class="sphinxsidebarwrapper">
|
|
<p class="logo"><a href="../../index.html">
|
|
<img class="logo" src="../../_static/accounting-api-logo.png" alt="Logo"/>
|
|
</a></p><h3>Related Topics</h3>
|
|
<ul>
|
|
<li><a href="../../index.html">Documentation overview</a><ul>
|
|
<li><a href="../index.html">Module code</a><ul>
|
|
</ul></li>
|
|
</ul></li>
|
|
</ul>
|
|
<div id="searchbox" style="display: none">
|
|
<h3>Quick search</h3>
|
|
<form class="search" action="../../search.html" method="get">
|
|
<input type="text" name="q" />
|
|
<input type="submit" value="Go" />
|
|
<input type="hidden" name="check_keywords" value="yes" />
|
|
<input type="hidden" name="area" value="default" />
|
|
</form>
|
|
<p class="searchtip" style="font-size: 90%">
|
|
Enter search terms or a module, class or function name.
|
|
</p>
|
|
</div>
|
|
<script type="text/javascript">$('#searchbox').show(0);</script>
|
|
</div>
|
|
</div>
|
|
<div class="clearer"></div>
|
|
</div>
|
|
<div class="footer">
|
|
© Copyright 2013, Joar Wandborg.
|
|
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a>.
|
|
</div>
|
|
|
|
</body>
|
|
</html> |