python-feedgen/api.util.html
Lars Kiesow daf3a41c78
Documentation for v0.3.1
Signed-off-by: Lars Kiesow <lkiesow@uos.de>
2015-01-21 01:09:16 +01:00

111 lines
No EOL
4.6 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>feedgen.util &mdash; python-feedgen 0.3.1 documentation</title>
<link rel="stylesheet" href="_static/lernfunk.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.3.1',
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="python-feedgen 0.3.1 documentation" href="index.html" />
<link rel="up" title="API Documentation" href="api.html" />
<link rel="next" title="feedgen.ext.base" href="ext/api.ext.base.html" />
<link rel="prev" title="feedgen.entry" href="api.entry.html" />
</head>
<body>
<div class="header"><h1 class="heading"><a href="index.html">
<span>python-feedgen 0.3.1 documentation</span></a></h1>
<h2 class="heading"><span>feedgen.util</span></h2>
</div>
<div class="topnav">
<p>
«&#160;&#160;<a href="api.entry.html">feedgen.entry</a>
&#160;&#160;::&#160;&#160;
<a class="uplink" href="index.html">Contents</a>
&#160;&#160;::&#160;&#160;
<a href="ext/api.ext.base.html">feedgen.ext.base</a>&#160;&#160;»
</p>
</div>
<div class="content">
<div class="apititle"><b>Contents</b></div>
<div class="apitoc"></div><span class="target" id="module-feedgen.util"></span><div class="section" id="feedgen-util">
<h1>feedgen.util<a class="headerlink" href="#feedgen-util" title="Permalink to this headline"></a></h1>
<p>This file contains helper functions for the feed generator module.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">copyright:</th><td class="field-body">2013, Lars Kiesow &lt;<a class="reference external" href="mailto:lkiesow&#37;&#52;&#48;uos&#46;de">lkiesow<span>&#64;</span>uos<span>&#46;</span>de</a>&gt;</td>
</tr>
<tr class="field-even field"><th class="field-name">license:</th><td class="field-body">FreeBSD and LGPL, see license.* for more details.</td>
</tr>
</tbody>
</table>
<dl class="function">
<dt id="feedgen.util.ensure_format">
<tt class="descclassname">feedgen.util.</tt><tt class="descname">ensure_format</tt><big>(</big><em>val</em>, <em>allowed</em>, <em>required</em>, <em>allowed_values=None</em>, <em>defaults=None</em><big>)</big><a class="headerlink" href="#feedgen.util.ensure_format" title="Permalink to this definition"></a></dt>
<dd><p>Takes a dictionary or a list of dictionaries and check if all keys are in
the set of allowed keys, if all required keys are present and if the values
of a specific key are ok.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>val</strong> &#8211; Dictionaries to check.</li>
<li><strong>allowed</strong> &#8211; Set of allowed keys.</li>
<li><strong>required</strong> &#8211; Set of required keys.</li>
<li><strong>allowed_values</strong> &#8211; Dictionary with keys and sets of their allowed values.</li>
<li><strong>defaults</strong> &#8211; Dictionary with default values.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">List of checked dictionaries.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
</div>
</div>
<div class="bottomnav">
<p>
«&#160;&#160;<a href="api.entry.html">feedgen.entry</a>
&#160;&#160;::&#160;&#160;
<a class="uplink" href="index.html">Contents</a>
&#160;&#160;::&#160;&#160;
<a href="ext/api.ext.base.html">feedgen.ext.base</a>&#160;&#160;»
</p>
</div>
<div class="footer">
&copy; Copyright 2013, Lars Kiesow.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.2.
</div>
</body>
</html>