-
Notifications
You must be signed in to change notification settings - Fork 0
/
documentation.html
84 lines (72 loc) · 4.76 KB
/
documentation.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module test</title>
<meta charset="utf-8">
</head><body bgcolor="#f0f0f8">
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>test</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/allen/PycharmProjects/untitled/test.py">/home/allen/PycharmProjects/untitled/test.py</a></font></td></tr></table>
<p><tt>This example module reads a list of product ids, gets their metadata from an API, and allows them to be searched.<br>
To generate HTML documentation for this module issue the<br>
command:<br>
<br>
pydoc -w test</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="csv.html">csv</a><br>
<a href="simplejson.html">simplejson</a><br>
</td><td width="25%" valign=top><a href="time.html">time</a><br>
<a href="urllib2.html">urllib2</a><br>
</td><td width="25%" valign=top><a href="web.html">web</a><br>
</td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="test.html#SearchItems">SearchItems</a>
</font></dt></dl>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="SearchItems">class <strong>SearchItems</strong></a></font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt><a href="#SearchItems">SearchItems</a> handles the request from the /search/* url.<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="SearchItems-GET"><strong>GET</strong></a>(self, keyword)</dt><dd><tt>Handle the GET method of our API<br>
<br>
:param keyword: the search term passed in from GET method<br>
:return: a json formatted list of ids that match the search term</tt></dd></dl>
<dl><dt><a name="SearchItems-__init__"><strong>__init__</strong></a>(self)</dt><dd><tt>Initialize a <a href="#SearchItems">SearchItems</a> object</tt></dd></dl>
<dl><dt><a name="SearchItems-get_data"><strong>get_data</strong></a>(self, url)</dt><dd><tt>Gets data from the given URL<br>
Recursively tries 3 times before giving up<br>
<br>
:param url:<br>
:return: json decoded array from url response</tt></dd></dl>
<dl><dt><a name="SearchItems-search_rows"><strong>search_rows</strong></a>(self, rows, keyword)</dt><dd><tt>Searches an array of walmart api metadata listings for the given keyword<br>
<br>
:param rows: Walmart metadata rows<br>
:param keyword: search term<br>
:return: an array of matching product IDs</tt></dd></dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>max_tries</strong> = 3</dl>
<dl><dt><strong>tries</strong> = 0</dl>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
<td width="100%"><strong>app</strong> = <web.application.application instance><br>
<strong>urls</strong> = ('/search/(.*)', 'SearchItems')</td></tr></table>
</body></html>