-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jeff Knupp
committed
Apr 11, 2014
1 parent
e6d5d60
commit cd8d372
Showing
80 changed files
with
9,659 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Sphinx build info version 1 | ||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. | ||
config: 9b3b2e4425e527395d3c54b0f3fcc46a | ||
tags: a205e9ed8462ae86fdd2f73488852ba9 | ||
config: 8b0c1a63fbcf9f89e4f4fb9d96bfd2b7 | ||
tags: 645f666f9bcd5a90fca523b33c5a78b7 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
<!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>Overview: module code — sandman 0.8.1 documentation</title> | ||
|
||
<link rel="stylesheet" href="../_static/default.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.8.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="sandman 0.8.1 documentation" href="../index.html" /> | ||
</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="../py-modindex.html" title="Python Module Index" | ||
>modules</a> |</li> | ||
<li><a href="../index.html">sandman 0.8.1 documentation</a> »</li> | ||
</ul> | ||
</div> | ||
|
||
<div class="document"> | ||
<div class="documentwrapper"> | ||
<div class="bodywrapper"> | ||
<div class="body"> | ||
|
||
<h1>All modules for which code is available</h1> | ||
<ul><li><a href="sandman/exception.html">sandman.exception</a></li> | ||
<li><a href="sandman/model.html">sandman.model</a></li> | ||
<ul><li><a href="sandman/model/models.html">sandman.model.models</a></li> | ||
</ul><li><a href="sandman/sandman.html">sandman.sandman</a></li> | ||
</ul> | ||
|
||
</div> | ||
</div> | ||
</div> | ||
<div class="sphinxsidebar"> | ||
<div class="sphinxsidebarwrapper"> | ||
<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="related"> | ||
<h3>Navigation</h3> | ||
<ul> | ||
<li class="right" style="margin-right: 10px"> | ||
<a href="../genindex.html" title="General Index" | ||
>index</a></li> | ||
<li class="right" > | ||
<a href="../py-modindex.html" title="Python Module Index" | ||
>modules</a> |</li> | ||
<li><a href="../index.html">sandman 0.8.1 documentation</a> »</li> | ||
</ul> | ||
</div> | ||
<div class="footer"> | ||
© Copyright 2013, Jeff Knupp. | ||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2. | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
<!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>sandman.exception — sandman 0.8.1 documentation</title> | ||
|
||
<link rel="stylesheet" href="../../_static/default.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.8.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="sandman 0.8.1 documentation" href="../../index.html" /> | ||
<link rel="up" title="Module code" href="../index.html" /> | ||
</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="../../py-modindex.html" title="Python Module Index" | ||
>modules</a> |</li> | ||
<li><a href="../../index.html">sandman 0.8.1 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 sandman.exception</h1><div class="highlight"><pre> | ||
<span class="sd">"""Exception specifications for Sandman"""</span> | ||
|
||
<span class="kn">from</span> <span class="nn">flask</span> <span class="kn">import</span> <span class="n">make_response</span><span class="p">,</span> <span class="n">render_template</span> | ||
|
||
<div class="viewcode-block" id="InvalidAPIUsage"><a class="viewcode-back" href="../../sandman.html#sandman.exception.InvalidAPIUsage">[docs]</a><span class="k">class</span> <span class="nc">InvalidAPIUsage</span><span class="p">(</span><span class="ne">Exception</span><span class="p">):</span> | ||
<span class="sd">"""Excecption which generates a :class:`flask.Response` object whose</span> | ||
<span class="sd"> *data* is JSON rather than HTML"""</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="n">code</span><span class="o">=</span><span class="mi">400</span><span class="p">,</span> <span class="n">message</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span> <span class="n">payload</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span> | ||
<span class="nb">super</span><span class="p">(</span><span class="n">InvalidAPIUsage</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="n">__init__</span><span class="p">(</span><span class="n">message</span><span class="p">)</span> | ||
<span class="bp">self</span><span class="o">.</span><span class="n">message</span> <span class="o">=</span> <span class="n">message</span> | ||
<span class="bp">self</span><span class="o">.</span><span class="n">payload</span> <span class="o">=</span> <span class="n">payload</span> | ||
<span class="k">if</span> <span class="n">code</span> <span class="ow">is</span> <span class="ow">not</span> <span class="bp">None</span><span class="p">:</span> | ||
<span class="bp">self</span><span class="o">.</span><span class="n">code</span> <span class="o">=</span> <span class="n">code</span> | ||
|
||
<div class="viewcode-block" id="InvalidAPIUsage.to_dict"><a class="viewcode-back" href="../../sandman.html#sandman.exception.InvalidAPIUsage.to_dict">[docs]</a> <span class="k">def</span> <span class="nf">to_dict</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span> | ||
<span class="sd">"""Return a dictionary representation of the exception."""</span> | ||
<span class="n">as_dict</span> <span class="o">=</span> <span class="nb">dict</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">payload</span> <span class="ow">or</span> <span class="p">())</span> | ||
<span class="n">as_dict</span><span class="p">[</span><span class="s">'message'</span><span class="p">]</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">message</span> | ||
<span class="k">return</span> <span class="n">as_dict</span> | ||
</div> | ||
<div class="viewcode-block" id="InvalidAPIUsage.abort"><a class="viewcode-back" href="../../sandman.html#sandman.exception.InvalidAPIUsage.abort">[docs]</a> <span class="k">def</span> <span class="nf">abort</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span> | ||
<span class="sd">"""Return an HTML Response representation of the exception."""</span> | ||
<span class="n">resp</span> <span class="o">=</span> <span class="n">make_response</span><span class="p">(</span><span class="n">render_template</span><span class="p">(</span><span class="s">'error.html'</span><span class="p">,</span> <span class="n">error</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">code</span><span class="p">,</span> <span class="n">message</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">message</span><span class="p">),</span> <span class="bp">self</span><span class="o">.</span><span class="n">code</span><span class="p">)</span> | ||
<span class="k">return</span> <span class="n">resp</span></div></div> | ||
</pre></div> | ||
|
||
</div> | ||
</div> | ||
</div> | ||
<div class="sphinxsidebar"> | ||
<div class="sphinxsidebarwrapper"> | ||
<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="related"> | ||
<h3>Navigation</h3> | ||
<ul> | ||
<li class="right" style="margin-right: 10px"> | ||
<a href="../../genindex.html" title="General Index" | ||
>index</a></li> | ||
<li class="right" > | ||
<a href="../../py-modindex.html" title="Python Module Index" | ||
>modules</a> |</li> | ||
<li><a href="../../index.html">sandman 0.8.1 documentation</a> »</li> | ||
<li><a href="../index.html" >Module code</a> »</li> | ||
</ul> | ||
</div> | ||
<div class="footer"> | ||
© Copyright 2013, Jeff Knupp. | ||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2. | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
<!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>sandman.model — sandman 0.8.1 documentation</title> | ||
|
||
<link rel="stylesheet" href="../../_static/default.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.8.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="sandman 0.8.1 documentation" href="../../index.html" /> | ||
<link rel="up" title="Module code" href="../index.html" /> | ||
</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="../../py-modindex.html" title="Python Module Index" | ||
>modules</a> |</li> | ||
<li><a href="../../index.html">sandman 0.8.1 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 sandman.model</h1><div class="highlight"><pre> | ||
<span class="sd">"""The model module is repsonsible exposes the :class:`sandman.model.Model` class,</span> | ||
<span class="sd">from which user models should derive. It also makes the :func:`register`</span> | ||
<span class="sd">function available, which maps endpoints to their associated classes."""</span> | ||
|
||
<span class="kn">from</span> <span class="nn">sandman.model.utils</span> <span class="kn">import</span> <span class="n">register</span><span class="p">,</span> <span class="n">activate</span><span class="p">,</span> <span class="n">Model</span> | ||
</pre></div> | ||
|
||
</div> | ||
</div> | ||
</div> | ||
<div class="sphinxsidebar"> | ||
<div class="sphinxsidebarwrapper"> | ||
<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="related"> | ||
<h3>Navigation</h3> | ||
<ul> | ||
<li class="right" style="margin-right: 10px"> | ||
<a href="../../genindex.html" title="General Index" | ||
>index</a></li> | ||
<li class="right" > | ||
<a href="../../py-modindex.html" title="Python Module Index" | ||
>modules</a> |</li> | ||
<li><a href="../../index.html">sandman 0.8.1 documentation</a> »</li> | ||
<li><a href="../index.html" >Module code</a> »</li> | ||
</ul> | ||
</div> | ||
<div class="footer"> | ||
© Copyright 2013, Jeff Knupp. | ||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2. | ||
</div> | ||
</body> | ||
</html> |
Oops, something went wrong.