Skip to content

Commit

Permalink
Clean up directory structure, unused files, etc
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffknupp committed Aug 8, 2013
1 parent 41386e7 commit 44789d2
Show file tree
Hide file tree
Showing 63 changed files with 104 additions and 39 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ recommend that a file or class name and description of purpose be included on
the same "printed page" as the copyright notice for easier identification within
third-party archives.

Copyright [yyyy] [name of copyright owner]
Copyright 2013 Jeff Knupp

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Binary file modified docs/.doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/.doctrees/index.doctree
Binary file not shown.
Binary file modified docs/.doctrees/installation.doctree
Binary file not shown.
Binary file modified docs/.doctrees/modules.doctree
Binary file not shown.
Binary file modified docs/.doctrees/quickstart.doctree
Binary file not shown.
Binary file modified docs/.doctrees/sandman.doctree
Binary file not shown.
File renamed without changes.
4 changes: 4 additions & 0 deletions docs/generated/.buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +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:
tags:
Binary file added docs/generated/.doctrees/environment.pickle
Binary file not shown.
Binary file added docs/generated/.doctrees/index.doctree
Binary file not shown.
Binary file added docs/generated/.doctrees/installation.doctree
Binary file not shown.
Binary file added docs/generated/.doctrees/modules.doctree
Binary file not shown.
Binary file added docs/generated/.doctrees/quickstart.doctree
Binary file not shown.
Binary file added docs/generated/.doctrees/sandman.doctree
Binary file not shown.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ <h1>Source code for sandman.model</h1><div class="highlight"><pre>
<span class="sd"> endpoint.</span>
<span class="sd"> </span>
<span class="sd"> :param cls: User-defined class derived from :class:`sandman.Resource` to be</span>
<span class="sd"> registered with the endpoint returned by :func:`endpoint()`</span>
<span class="sd"> registered with the endpoint returned by :func:`endpoint()`</span>
<span class="sd"> :type cls: :class:`sandman.Resource` or tuple</span>
<span class="sd"> </span>
<span class="sd"> &quot;&quot;&quot;</span>
Expand Down

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ Create one file with the following contents (which I call ``runserver.py``)::
from sandman import app, db
app.config['SQLALCHEMY_DATABASE_URI'] = '<your database connection string (using SQLAlchemy)'
app.run()
```

Then simply run::

Expand Down
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
4 changes: 4 additions & 0 deletions docs/genindex.html → docs/generated/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,10 @@ <h2 id="R">R</h2>
<dt><a href="sandman.html#sandman.sandman.resource_handler">resource_handler() (in module sandman.sandman)</a>
</dt>


<dt><a href="sandman.html#sandman.sandman.resource_response">resource_response() (in module sandman.sandman)</a>
</dt>

</dl></td>
</tr></table>

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file added docs/generated/objects.inv
Binary file not shown.
File renamed without changes.
16 changes: 8 additions & 8 deletions docs/quickstart.html → docs/generated/quickstart.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,16 @@ <h3>Navigation</h3>
<div class="section" id="quickstart">
<h1>Quickstart<a class="headerlink" href="#quickstart" title="Permalink to this headline"></a></h1>
<p>Create one file with the following contents (which I call <tt class="docutils literal"><span class="pre">runserver.py</span></tt>):</p>
<div class="highlight-python"><pre>from sandman.model import register, Model
<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">sandman.model</span> <span class="kn">import</span> <span class="n">register</span><span class="p">,</span> <span class="n">Model</span>

# Insert Models here
# Register models here
# register((Model1, Model2, Model3))
<span class="c"># Insert Models here</span>
<span class="c"># Register models here</span>
<span class="c"># register((Model1, Model2, Model3))</span>

from sandman import app, db
app.config[&#x27;SQLALCHEMY_DATABASE_URI&#x27;] = &#x27;&lt;your database connection string (using SQLAlchemy)&#x27;
app.run()
```</pre>
<span class="kn">from</span> <span class="nn">sandman</span> <span class="kn">import</span> <span class="n">app</span><span class="p">,</span> <span class="n">db</span>
<span class="n">app</span><span class="o">.</span><span class="n">config</span><span class="p">[</span><span class="s">&#39;SQLALCHEMY_DATABASE_URI&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="s">&#39;&lt;your database connection string (using SQLAlchemy)&#39;</span>
<span class="n">app</span><span class="o">.</span><span class="n">run</span><span class="p">()</span>
</pre></div>
</div>
<p>Then simply run:</p>
<div class="highlight-python"><pre>python runserver.py</pre>
Expand Down
12 changes: 8 additions & 4 deletions docs/sandman.html → docs/generated/sandman.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,11 @@ <h1>sandman Package<a class="headerlink" href="#sandman-package" title="Permalin
<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"><strong>cls</strong> &#8211; User-defined class derived from <tt class="xref py py-class docutils literal"><span class="pre">sandman.Resource</span></tt> to be</td>
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>cls</strong> (<tt class="xref py py-class docutils literal"><span class="pre">sandman.Resource</span></tt> or tuple) &#8211; User-defined class derived from <tt class="xref py py-class docutils literal"><span class="pre">sandman.Resource</span></tt> to be
registered with the endpoint returned by <tt class="xref py py-func docutils literal"><span class="pre">endpoint()</span></tt></td>
</tr>
</tbody>
</table>
<p>registered with the endpoint returned by <tt class="xref py py-func docutils literal"><span class="pre">endpoint()</span></tt>
:type cls: <tt class="xref py py-class docutils literal"><span class="pre">sandman.Resource</span></tt> or tuple</p>
</dd></dl>

</div>
Expand Down Expand Up @@ -208,7 +207,7 @@ <h1>sandman Package<a class="headerlink" href="#sandman-package" title="Permalin

<dl class="function">
<dt id="sandman.sandman.resource_created_response">
<tt class="descclassname">sandman.sandman.</tt><tt class="descname">resource_created_response</tt><big>(</big><em>resource</em><big>)</big><a class="reference internal" href="_modules/sandman/sandman.html#resource_created_response"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#sandman.sandman.resource_created_response" title="Permalink to this definition"></a></dt>
<tt class="descclassname">sandman.sandman.</tt><tt class="descname">resource_created_response</tt><big>(</big><em>resource</em>, <em>current_request</em><big>)</big><a class="reference internal" href="_modules/sandman/sandman.html#resource_created_response"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#sandman.sandman.resource_created_response" title="Permalink to this definition"></a></dt>
<dd><p>Return HTTP response with status code <em>201</em>, signaling a created <em>resource</em></p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
Expand Down Expand Up @@ -243,6 +242,11 @@ <h1>sandman Package<a class="headerlink" href="#sandman-package" title="Permalin
</table>
</dd></dl>

<dl class="function">
<dt id="sandman.sandman.resource_response">
<tt class="descclassname">sandman.sandman.</tt><tt class="descname">resource_response</tt><big>(</big><em>resource</em>, <em>current_request</em><big>)</big><a class="reference internal" href="_modules/sandman/sandman.html#resource_response"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#sandman.sandman.resource_response" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="sandman.sandman.unsupported_method_response">
<tt class="descclassname">sandman.sandman.</tt><tt class="descname">unsupported_method_response</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/sandman/sandman.html#unsupported_method_response"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#sandman.sandman.unsupported_method_response" title="Permalink to this definition"></a></dt>
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions docs/generated/searchindex.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 0 additions & 8 deletions docs/objects.inv

This file was deleted.

1 change: 0 additions & 1 deletion doc/quickstart.rst → docs/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ Create one file with the following contents (which I call ``runserver.py``)::
from sandman import app, db
app.config['SQLALCHEMY_DATABASE_URI'] = '<your database connection string (using SQLAlchemy)'
app.run()
```

Then simply run::

Expand Down
File renamed without changes.
1 change: 0 additions & 1 deletion docs/searchindex.js

This file was deleted.

Empty file modified sandman/test/test_sandman.py
100755 → 100644
Empty file.
15 changes: 15 additions & 0 deletions scripts/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from sandman.model import register, Model

class Artist(Model):
__tablename__ = 'Artist'

class Album(Model):
__tablename__ = 'Album'

class Playlist(Model):
__tablename__ = 'Playlist'

class Genre(Model):
__tablename__ = 'Genre'

register((Artist, Album, Playlist, Genre))
3 changes: 2 additions & 1 deletion scripts/runserver.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""Run server"""
from sandman import app, db
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///chinook'
import os
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:////' + os.path.abspath(os.path.dirname(__file__)) + '/chinook'
import models
app.run(debug=True)

0 comments on commit 44789d2

Please sign in to comment.