| |
| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| <html><head><title>Python: module gdata.spreadsheet.text_db</title> |
| </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><a href="gdata.html"><font color="#ffffff">gdata</font></a>.<a href="gdata.spreadsheet.html"><font color="#ffffff">spreadsheet</font></a>.text_db</strong></big></big></font></td |
| ><td align=right valign=bottom |
| ><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/usr/local/google/home/afshar/src/external-gdata-release/google3/src/gdata/spreadsheet/text_db.py">/usr/local/google/home/afshar/src/external-gdata-release/google3/src/gdata/spreadsheet/text_db.py</a></font></td></tr></table> |
| <p><tt># Copyright Google 2007-2008, all rights reserved.<br> |
| #<br> |
| # Licensed under the Apache License, Version 2.0 (the "License");<br> |
| # you may not use this file except in compliance with the License.<br> |
| # You may obtain a copy of the License at<br> |
| #<br> |
| # <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a><br> |
| #<br> |
| # Unless required by applicable law or agreed to in writing, software<br> |
| # distributed under the License is distributed on an "AS IS" BASIS,<br> |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<br> |
| # See the License for the specific language governing permissions and<br> |
| # limitations under the License.</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="StringIO.html">StringIO</a><br> |
| </td><td width="25%" valign=top><a href="gdata.html">gdata</a><br> |
| </td><td width="25%" valign=top></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="__builtin__.html#list">__builtin__.list</a>(<a href="__builtin__.html#object">__builtin__.object</a>) |
| </font></dt><dd> |
| <dl> |
| <dt><font face="helvetica, arial"><a href="gdata.spreadsheet.text_db.html#RecordResultSet">RecordResultSet</a> |
| </font></dt></dl> |
| </dd> |
| <dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a> |
| </font></dt><dd> |
| <dl> |
| <dt><font face="helvetica, arial"><a href="gdata.spreadsheet.text_db.html#Database">Database</a> |
| </font></dt><dt><font face="helvetica, arial"><a href="gdata.spreadsheet.text_db.html#DatabaseClient">DatabaseClient</a> |
| </font></dt><dt><font face="helvetica, arial"><a href="gdata.spreadsheet.text_db.html#Record">Record</a> |
| </font></dt><dt><font face="helvetica, arial"><a href="gdata.spreadsheet.text_db.html#Table">Table</a> |
| </font></dt></dl> |
| </dd> |
| <dt><font face="helvetica, arial"><a href="exceptions.html#Exception">exceptions.Exception</a>(<a href="exceptions.html#BaseException">exceptions.BaseException</a>) |
| </font></dt><dd> |
| <dl> |
| <dt><font face="helvetica, arial"><a href="gdata.spreadsheet.text_db.html#Error">Error</a> |
| </font></dt><dd> |
| <dl> |
| <dt><font face="helvetica, arial"><a href="gdata.spreadsheet.text_db.html#BadCredentials">BadCredentials</a> |
| </font></dt><dt><font face="helvetica, arial"><a href="gdata.spreadsheet.text_db.html#CaptchaRequired">CaptchaRequired</a> |
| </font></dt></dl> |
| </dd> |
| </dl> |
| </dd> |
| </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="BadCredentials">class <strong>BadCredentials</strong></a>(<a href="gdata.spreadsheet.text_db.html#Error">Error</a>)</font></td></tr> |
| |
| <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> |
| <td width="100%"><dl><dt>Method resolution order:</dt> |
| <dd><a href="gdata.spreadsheet.text_db.html#BadCredentials">BadCredentials</a></dd> |
| <dd><a href="gdata.spreadsheet.text_db.html#Error">Error</a></dd> |
| <dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd> |
| <dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd> |
| <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> |
| </dl> |
| <hr> |
| Data descriptors inherited from <a href="gdata.spreadsheet.text_db.html#Error">Error</a>:<br> |
| <dl><dt><strong>__weakref__</strong></dt> |
| <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| </dl> |
| <hr> |
| Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> |
| <dl><dt><a name="BadCredentials-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#BadCredentials-__init__">__init__</a>(...) initializes x; see help(type(x)) for signature</tt></dd></dl> |
| |
| <hr> |
| Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> |
| <dl><dt><strong>__new__</strong> = <built-in method __new__ of type object><dd><tt>T.<a href="#BadCredentials-__new__">__new__</a>(S, ...) -> a new <a href="__builtin__.html#object">object</a> with type S, a subtype of T</tt></dl> |
| |
| <hr> |
| Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br> |
| <dl><dt><a name="BadCredentials-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#BadCredentials-__delattr__">__delattr__</a>('name') <==> del x.name</tt></dd></dl> |
| |
| <dl><dt><a name="BadCredentials-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#BadCredentials-__getattribute__">__getattribute__</a>('name') <==> x.name</tt></dd></dl> |
| |
| <dl><dt><a name="BadCredentials-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#BadCredentials-__getitem__">__getitem__</a>(y) <==> x[y]</tt></dd></dl> |
| |
| <dl><dt><a name="BadCredentials-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#BadCredentials-__getslice__">__getslice__</a>(i, j) <==> x[i:j]<br> |
| <br> |
| Use of negative indices is not supported.</tt></dd></dl> |
| |
| <dl><dt><a name="BadCredentials-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl> |
| |
| <dl><dt><a name="BadCredentials-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#BadCredentials-__repr__">__repr__</a>() <==> repr(x)</tt></dd></dl> |
| |
| <dl><dt><a name="BadCredentials-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#BadCredentials-__setattr__">__setattr__</a>('name', value) <==> x.name = value</tt></dd></dl> |
| |
| <dl><dt><a name="BadCredentials-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl> |
| |
| <dl><dt><a name="BadCredentials-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#BadCredentials-__str__">__str__</a>() <==> str(x)</tt></dd></dl> |
| |
| <dl><dt><a name="BadCredentials-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl> |
| |
| <hr> |
| Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br> |
| <dl><dt><strong>__dict__</strong></dt> |
| </dl> |
| <dl><dt><strong>args</strong></dt> |
| </dl> |
| <dl><dt><strong>message</strong></dt> |
| </dl> |
| </td></tr></table> <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="CaptchaRequired">class <strong>CaptchaRequired</strong></a>(<a href="gdata.spreadsheet.text_db.html#Error">Error</a>)</font></td></tr> |
| |
| <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> |
| <td width="100%"><dl><dt>Method resolution order:</dt> |
| <dd><a href="gdata.spreadsheet.text_db.html#CaptchaRequired">CaptchaRequired</a></dd> |
| <dd><a href="gdata.spreadsheet.text_db.html#Error">Error</a></dd> |
| <dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd> |
| <dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd> |
| <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> |
| </dl> |
| <hr> |
| Data descriptors inherited from <a href="gdata.spreadsheet.text_db.html#Error">Error</a>:<br> |
| <dl><dt><strong>__weakref__</strong></dt> |
| <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| </dl> |
| <hr> |
| Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> |
| <dl><dt><a name="CaptchaRequired-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#CaptchaRequired-__init__">__init__</a>(...) initializes x; see help(type(x)) for signature</tt></dd></dl> |
| |
| <hr> |
| Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> |
| <dl><dt><strong>__new__</strong> = <built-in method __new__ of type object><dd><tt>T.<a href="#CaptchaRequired-__new__">__new__</a>(S, ...) -> a new <a href="__builtin__.html#object">object</a> with type S, a subtype of T</tt></dl> |
| |
| <hr> |
| Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br> |
| <dl><dt><a name="CaptchaRequired-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#CaptchaRequired-__delattr__">__delattr__</a>('name') <==> del x.name</tt></dd></dl> |
| |
| <dl><dt><a name="CaptchaRequired-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#CaptchaRequired-__getattribute__">__getattribute__</a>('name') <==> x.name</tt></dd></dl> |
| |
| <dl><dt><a name="CaptchaRequired-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#CaptchaRequired-__getitem__">__getitem__</a>(y) <==> x[y]</tt></dd></dl> |
| |
| <dl><dt><a name="CaptchaRequired-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#CaptchaRequired-__getslice__">__getslice__</a>(i, j) <==> x[i:j]<br> |
| <br> |
| Use of negative indices is not supported.</tt></dd></dl> |
| |
| <dl><dt><a name="CaptchaRequired-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl> |
| |
| <dl><dt><a name="CaptchaRequired-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#CaptchaRequired-__repr__">__repr__</a>() <==> repr(x)</tt></dd></dl> |
| |
| <dl><dt><a name="CaptchaRequired-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#CaptchaRequired-__setattr__">__setattr__</a>('name', value) <==> x.name = value</tt></dd></dl> |
| |
| <dl><dt><a name="CaptchaRequired-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl> |
| |
| <dl><dt><a name="CaptchaRequired-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#CaptchaRequired-__str__">__str__</a>() <==> str(x)</tt></dd></dl> |
| |
| <dl><dt><a name="CaptchaRequired-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl> |
| |
| <hr> |
| Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br> |
| <dl><dt><strong>__dict__</strong></dt> |
| </dl> |
| <dl><dt><strong>args</strong></dt> |
| </dl> |
| <dl><dt><strong>message</strong></dt> |
| </dl> |
| </td></tr></table> <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="Database">class <strong>Database</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr> |
| |
| <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> |
| <td colspan=2><tt>Provides interface to find and create tables.<br> |
| <br> |
| The database represents a Google Spreadsheet.<br> </tt></td></tr> |
| <tr><td> </td> |
| <td width="100%">Methods defined here:<br> |
| <dl><dt><a name="Database-CreateTable"><strong>CreateTable</strong></a>(self, name, fields<font color="#909090">=None</font>)</dt><dd><tt>Add a new worksheet to this spreadsheet and fill in column names.<br> |
| <br> |
| Args:<br> |
| name: str The title of the new worksheet.<br> |
| fields: <a href="__builtin__.html#list">list</a> of strings The column names which are placed in the<br> |
| first row of this worksheet. These names are converted into XML<br> |
| tags by the server. To avoid changes during the translation<br> |
| process I recommend using all lowercase alphabetic names. For<br> |
| example ['somelongname', 'theothername']<br> |
| <br> |
| Returns:<br> |
| <a href="#Table">Table</a> representing the newly created worksheet.</tt></dd></dl> |
| |
| <dl><dt><a name="Database-Delete"><strong>Delete</strong></a>(self)</dt><dd><tt>Deletes the entire database spreadsheet from Google Spreadsheets.</tt></dd></dl> |
| |
| <dl><dt><a name="Database-GetTables"><strong>GetTables</strong></a>(self, worksheet_id<font color="#909090">=None</font>, name<font color="#909090">=None</font>)</dt><dd><tt>Searches for a worksheet with the specified ID or name.<br> |
| <br> |
| The <a href="__builtin__.html#list">list</a> of results should have one table at most, or no results<br> |
| if the id or name were not found.<br> |
| <br> |
| Args:<br> |
| worksheet_id: str The ID of the worksheet, example: 'od6'<br> |
| name: str The title of the worksheet.<br> |
| <br> |
| Returns:<br> |
| A <a href="__builtin__.html#list">list</a> of length 0 or 1 containing the desired <a href="#Table">Table</a>. A <a href="__builtin__.html#list">list</a> is returned<br> |
| to make this method feel like GetDatabases and GetRecords.</tt></dd></dl> |
| |
| <dl><dt><a name="Database-__init__"><strong>__init__</strong></a>(self, spreadsheet_entry<font color="#909090">=None</font>, database_client<font color="#909090">=None</font>)</dt><dd><tt>Constructor for a database <a href="__builtin__.html#object">object</a>.<br> |
| <br> |
| Args:<br> |
| spreadsheet_entry: gdata.docs.DocumentListEntry The <br> |
| Atom entry which represents the Google Spreadsheet. The<br> |
| spreadsheet's key is extracted from the entry and stored as a <br> |
| member.<br> |
| database_client: <a href="#DatabaseClient">DatabaseClient</a> A client which can talk to the<br> |
| Google Spreadsheets servers to perform operations on worksheets<br> |
| within this spreadsheet.</tt></dd></dl> |
| |
| <hr> |
| Data descriptors defined here:<br> |
| <dl><dt><strong>__dict__</strong></dt> |
| <dd><tt>dictionary for instance variables (if defined)</tt></dd> |
| </dl> |
| <dl><dt><strong>__weakref__</strong></dt> |
| <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| </dl> |
| </td></tr></table> <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="DatabaseClient">class <strong>DatabaseClient</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr> |
| |
| <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> |
| <td colspan=2><tt>Allows creation and finding of Google Spreadsheets databases.<br> |
| <br> |
| The <a href="#DatabaseClient">DatabaseClient</a> simplifies the process of creating and finding Google <br> |
| Spreadsheets and will talk to both the Google Spreadsheets API and the <br> |
| Google Documents List API.<br> </tt></td></tr> |
| <tr><td> </td> |
| <td width="100%">Methods defined here:<br> |
| <dl><dt><a name="DatabaseClient-CreateDatabase"><strong>CreateDatabase</strong></a>(self, name)</dt><dd><tt>Creates a new Google Spreadsheet with the desired name.<br> |
| <br> |
| Args:<br> |
| name: str The title for the spreadsheet.<br> |
| <br> |
| Returns:<br> |
| A <a href="#Database">Database</a> instance representing the new spreadsheet.</tt></dd></dl> |
| |
| <dl><dt><a name="DatabaseClient-GetDatabases"><strong>GetDatabases</strong></a>(self, spreadsheet_key<font color="#909090">=None</font>, name<font color="#909090">=None</font>)</dt><dd><tt>Finds spreadsheets which have the unique key or title.<br> |
| <br> |
| If querying on the spreadsheet_key there will be at most one result, but<br> |
| searching by name could yield multiple results.<br> |
| <br> |
| Args:<br> |
| spreadsheet_key: str The unique key for the spreadsheet, this <br> |
| usually in the the form 'pk23...We' or 'o23...423.12,,,3'.<br> |
| name: str The title of the spreadsheets.<br> |
| <br> |
| Returns:<br> |
| A <a href="__builtin__.html#list">list</a> of <a href="#Database">Database</a> objects representing the desired spreadsheets.</tt></dd></dl> |
| |
| <dl><dt><a name="DatabaseClient-SetCredentials"><strong>SetCredentials</strong></a>(self, username, password)</dt><dd><tt>Attempts to log in to Google APIs using the provided credentials.<br> |
| <br> |
| If the username or password are None, the client will not request auth <br> |
| tokens.<br> |
| <br> |
| Args:<br> |
| username: str (optional) Example: jo@example.com<br> |
| password: str (optional)</tt></dd></dl> |
| |
| <dl><dt><a name="DatabaseClient-__init__"><strong>__init__</strong></a>(self, username<font color="#909090">=None</font>, password<font color="#909090">=None</font>)</dt><dd><tt>Constructor for a <a href="#Database">Database</a> Client. <br> |
| <br> |
| If the username and password are present, the constructor will contact<br> |
| the Google servers to authenticate.<br> |
| <br> |
| Args:<br> |
| username: str (optional) Example: jo@example.com<br> |
| password: str (optional)</tt></dd></dl> |
| |
| <hr> |
| Data descriptors defined here:<br> |
| <dl><dt><strong>__dict__</strong></dt> |
| <dd><tt>dictionary for instance variables (if defined)</tt></dd> |
| </dl> |
| <dl><dt><strong>__weakref__</strong></dt> |
| <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| </dl> |
| </td></tr></table> <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="Error">class <strong>Error</strong></a>(<a href="exceptions.html#Exception">exceptions.Exception</a>)</font></td></tr> |
| |
| <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> |
| <td width="100%"><dl><dt>Method resolution order:</dt> |
| <dd><a href="gdata.spreadsheet.text_db.html#Error">Error</a></dd> |
| <dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd> |
| <dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd> |
| <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> |
| </dl> |
| <hr> |
| Data descriptors defined here:<br> |
| <dl><dt><strong>__weakref__</strong></dt> |
| <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| </dl> |
| <hr> |
| Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> |
| <dl><dt><a name="Error-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__init__">__init__</a>(...) initializes x; see help(type(x)) for signature</tt></dd></dl> |
| |
| <hr> |
| Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> |
| <dl><dt><strong>__new__</strong> = <built-in method __new__ of type object><dd><tt>T.<a href="#Error-__new__">__new__</a>(S, ...) -> a new <a href="__builtin__.html#object">object</a> with type S, a subtype of T</tt></dl> |
| |
| <hr> |
| Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br> |
| <dl><dt><a name="Error-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__delattr__">__delattr__</a>('name') <==> del x.name</tt></dd></dl> |
| |
| <dl><dt><a name="Error-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__getattribute__">__getattribute__</a>('name') <==> x.name</tt></dd></dl> |
| |
| <dl><dt><a name="Error-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__getitem__">__getitem__</a>(y) <==> x[y]</tt></dd></dl> |
| |
| <dl><dt><a name="Error-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__getslice__">__getslice__</a>(i, j) <==> x[i:j]<br> |
| <br> |
| Use of negative indices is not supported.</tt></dd></dl> |
| |
| <dl><dt><a name="Error-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl> |
| |
| <dl><dt><a name="Error-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__repr__">__repr__</a>() <==> repr(x)</tt></dd></dl> |
| |
| <dl><dt><a name="Error-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__setattr__">__setattr__</a>('name', value) <==> x.name = value</tt></dd></dl> |
| |
| <dl><dt><a name="Error-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl> |
| |
| <dl><dt><a name="Error-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__str__">__str__</a>() <==> str(x)</tt></dd></dl> |
| |
| <dl><dt><a name="Error-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl> |
| |
| <hr> |
| Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br> |
| <dl><dt><strong>__dict__</strong></dt> |
| </dl> |
| <dl><dt><strong>args</strong></dt> |
| </dl> |
| <dl><dt><strong>message</strong></dt> |
| </dl> |
| </td></tr></table> <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="Record">class <strong>Record</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr> |
| |
| <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> |
| <td colspan=2><tt>Represents one row in a worksheet and provides a dictionary of values.<br> |
| <br> |
| Attributes:<br> |
| custom: dict Represents the contents of the row with cell values mapped<br> |
| to column headers.<br> </tt></td></tr> |
| <tr><td> </td> |
| <td width="100%">Methods defined here:<br> |
| <dl><dt><a name="Record-Delete"><strong>Delete</strong></a>(self)</dt></dl> |
| |
| <dl><dt><a name="Record-ExtractContentFromEntry"><strong>ExtractContentFromEntry</strong></a>(self, entry)</dt><dd><tt>Populates the content and row_id based on content of the entry.<br> |
| <br> |
| This method is used in the <a href="#Record">Record</a>'s contructor.<br> |
| <br> |
| Args:<br> |
| entry: gdata.spreadsheet.SpreadsheetsList The Atom entry <br> |
| representing this row in the worksheet.</tt></dd></dl> |
| |
| <dl><dt><a name="Record-Pull"><strong>Pull</strong></a>(self)</dt><dd><tt>Query Google Spreadsheets to get the latest data from the server.<br> |
| <br> |
| Fetches the entry for this row and repopulates the content dictionary <br> |
| with the data found in the row.</tt></dd></dl> |
| |
| <dl><dt><a name="Record-Push"><strong>Push</strong></a>(self)</dt><dd><tt>Send the content of the record to spreadsheets to edit the row.<br> |
| <br> |
| All items in the content dictionary will be sent. Items which have been<br> |
| removed from the content may remain in the row. The content member<br> |
| of the record will not be modified so additional fields in the row<br> |
| might be absent from this local copy.</tt></dd></dl> |
| |
| <dl><dt><a name="Record-__init__"><strong>__init__</strong></a>(self, content<font color="#909090">=None</font>, row_entry<font color="#909090">=None</font>, spreadsheet_key<font color="#909090">=None</font>, worksheet_id<font color="#909090">=None</font>, database_client<font color="#909090">=None</font>)</dt><dd><tt>Constructor for a record.<br> |
| <br> |
| Args:<br> |
| content: dict of strings Mapping of string values to column names.<br> |
| row_entry: gdata.spreadsheet.SpreadsheetsList The Atom entry <br> |
| representing this row in the worksheet.<br> |
| spreadsheet_key: str The ID of the spreadsheet in which this row <br> |
| belongs.<br> |
| worksheet_id: str The ID of the worksheet in which this row belongs.<br> |
| database_client: <a href="#DatabaseClient">DatabaseClient</a> The client which can be used to talk<br> |
| the Google Spreadsheets server to edit this row.</tt></dd></dl> |
| |
| <hr> |
| Data descriptors defined here:<br> |
| <dl><dt><strong>__dict__</strong></dt> |
| <dd><tt>dictionary for instance variables (if defined)</tt></dd> |
| </dl> |
| <dl><dt><strong>__weakref__</strong></dt> |
| <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| </dl> |
| </td></tr></table> <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="RecordResultSet">class <strong>RecordResultSet</strong></a>(<a href="__builtin__.html#list">__builtin__.list</a>)</font></td></tr> |
| |
| <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> |
| <td colspan=2><tt>A collection of rows which allows fetching of the next set of results.<br> |
| <br> |
| The server may not send all rows in the requested range because there are<br> |
| too many. Using this result set you can access the first set of results<br> |
| as if it is a <a href="__builtin__.html#list">list</a>, then get the next batch (if there are more results) by<br> |
| calling <a href="#RecordResultSet-GetNext">GetNext</a>().<br> </tt></td></tr> |
| <tr><td> </td> |
| <td width="100%"><dl><dt>Method resolution order:</dt> |
| <dd><a href="gdata.spreadsheet.text_db.html#RecordResultSet">RecordResultSet</a></dd> |
| <dd><a href="__builtin__.html#list">__builtin__.list</a></dd> |
| <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> |
| </dl> |
| <hr> |
| Methods defined here:<br> |
| <dl><dt><a name="RecordResultSet-GetNext"><strong>GetNext</strong></a>(self)</dt><dd><tt>Fetches the next batch of rows in the result set.<br> |
| <br> |
| Returns:<br> |
| A new <a href="#RecordResultSet">RecordResultSet</a>.</tt></dd></dl> |
| |
| <dl><dt><a name="RecordResultSet-__init__"><strong>__init__</strong></a>(self, feed, client, spreadsheet_key, worksheet_id)</dt></dl> |
| |
| <hr> |
| Data descriptors defined here:<br> |
| <dl><dt><strong>__dict__</strong></dt> |
| <dd><tt>dictionary for instance variables (if defined)</tt></dd> |
| </dl> |
| <dl><dt><strong>__weakref__</strong></dt> |
| <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| </dl> |
| <hr> |
| Methods inherited from <a href="__builtin__.html#list">__builtin__.list</a>:<br> |
| <dl><dt><a name="RecordResultSet-__add__"><strong>__add__</strong></a>(...)</dt><dd><tt>x.<a href="#RecordResultSet-__add__">__add__</a>(y) <==> x+y</tt></dd></dl> |
| |
| <dl><dt><a name="RecordResultSet-__contains__"><strong>__contains__</strong></a>(...)</dt><dd><tt>x.<a href="#RecordResultSet-__contains__">__contains__</a>(y) <==> y in x</tt></dd></dl> |
| |
| <dl><dt><a name="RecordResultSet-__delitem__"><strong>__delitem__</strong></a>(...)</dt><dd><tt>x.<a href="#RecordResultSet-__delitem__">__delitem__</a>(y) <==> del x[y]</tt></dd></dl> |
| |
| <dl><dt><a name="RecordResultSet-__delslice__"><strong>__delslice__</strong></a>(...)</dt><dd><tt>x.<a href="#RecordResultSet-__delslice__">__delslice__</a>(i, j) <==> del x[i:j]<br> |
| <br> |
| Use of negative indices is not supported.</tt></dd></dl> |
| |
| <dl><dt><a name="RecordResultSet-__eq__"><strong>__eq__</strong></a>(...)</dt><dd><tt>x.<a href="#RecordResultSet-__eq__">__eq__</a>(y) <==> x==y</tt></dd></dl> |
| |
| <dl><dt><a name="RecordResultSet-__ge__"><strong>__ge__</strong></a>(...)</dt><dd><tt>x.<a href="#RecordResultSet-__ge__">__ge__</a>(y) <==> x>=y</tt></dd></dl> |
| |
| <dl><dt><a name="RecordResultSet-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#RecordResultSet-__getattribute__">__getattribute__</a>('name') <==> x.name</tt></dd></dl> |
| |
| <dl><dt><a name="RecordResultSet-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#RecordResultSet-__getitem__">__getitem__</a>(y) <==> x[y]</tt></dd></dl> |
| |
| <dl><dt><a name="RecordResultSet-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#RecordResultSet-__getslice__">__getslice__</a>(i, j) <==> x[i:j]<br> |
| <br> |
| Use of negative indices is not supported.</tt></dd></dl> |
| |
| <dl><dt><a name="RecordResultSet-__gt__"><strong>__gt__</strong></a>(...)</dt><dd><tt>x.<a href="#RecordResultSet-__gt__">__gt__</a>(y) <==> x>y</tt></dd></dl> |
| |
| <dl><dt><a name="RecordResultSet-__iadd__"><strong>__iadd__</strong></a>(...)</dt><dd><tt>x.<a href="#RecordResultSet-__iadd__">__iadd__</a>(y) <==> x+=y</tt></dd></dl> |
| |
| <dl><dt><a name="RecordResultSet-__imul__"><strong>__imul__</strong></a>(...)</dt><dd><tt>x.<a href="#RecordResultSet-__imul__">__imul__</a>(y) <==> x*=y</tt></dd></dl> |
| |
| <dl><dt><a name="RecordResultSet-__iter__"><strong>__iter__</strong></a>(...)</dt><dd><tt>x.<a href="#RecordResultSet-__iter__">__iter__</a>() <==> iter(x)</tt></dd></dl> |
| |
| <dl><dt><a name="RecordResultSet-__le__"><strong>__le__</strong></a>(...)</dt><dd><tt>x.<a href="#RecordResultSet-__le__">__le__</a>(y) <==> x<=y</tt></dd></dl> |
| |
| <dl><dt><a name="RecordResultSet-__len__"><strong>__len__</strong></a>(...)</dt><dd><tt>x.<a href="#RecordResultSet-__len__">__len__</a>() <==> len(x)</tt></dd></dl> |
| |
| <dl><dt><a name="RecordResultSet-__lt__"><strong>__lt__</strong></a>(...)</dt><dd><tt>x.<a href="#RecordResultSet-__lt__">__lt__</a>(y) <==> x<y</tt></dd></dl> |
| |
| <dl><dt><a name="RecordResultSet-__mul__"><strong>__mul__</strong></a>(...)</dt><dd><tt>x.<a href="#RecordResultSet-__mul__">__mul__</a>(n) <==> x*n</tt></dd></dl> |
| |
| <dl><dt><a name="RecordResultSet-__ne__"><strong>__ne__</strong></a>(...)</dt><dd><tt>x.<a href="#RecordResultSet-__ne__">__ne__</a>(y) <==> x!=y</tt></dd></dl> |
| |
| <dl><dt><a name="RecordResultSet-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#RecordResultSet-__repr__">__repr__</a>() <==> repr(x)</tt></dd></dl> |
| |
| <dl><dt><a name="RecordResultSet-__reversed__"><strong>__reversed__</strong></a>(...)</dt><dd><tt>L.<a href="#RecordResultSet-__reversed__">__reversed__</a>() -- return a reverse iterator over the <a href="__builtin__.html#list">list</a></tt></dd></dl> |
| |
| <dl><dt><a name="RecordResultSet-__rmul__"><strong>__rmul__</strong></a>(...)</dt><dd><tt>x.<a href="#RecordResultSet-__rmul__">__rmul__</a>(n) <==> n*x</tt></dd></dl> |
| |
| <dl><dt><a name="RecordResultSet-__setitem__"><strong>__setitem__</strong></a>(...)</dt><dd><tt>x.<a href="#RecordResultSet-__setitem__">__setitem__</a>(i, y) <==> x[i]=y</tt></dd></dl> |
| |
| <dl><dt><a name="RecordResultSet-__setslice__"><strong>__setslice__</strong></a>(...)</dt><dd><tt>x.<a href="#RecordResultSet-__setslice__">__setslice__</a>(i, j, y) <==> x[i:j]=y<br> |
| <br> |
| Use of negative indices is not supported.</tt></dd></dl> |
| |
| <dl><dt><a name="RecordResultSet-__sizeof__"><strong>__sizeof__</strong></a>(...)</dt><dd><tt>L.<a href="#RecordResultSet-__sizeof__">__sizeof__</a>() -- size of L in memory, in bytes</tt></dd></dl> |
| |
| <dl><dt><a name="RecordResultSet-append"><strong>append</strong></a>(...)</dt><dd><tt>L.<a href="#RecordResultSet-append">append</a>(<a href="__builtin__.html#object">object</a>) -- append <a href="__builtin__.html#object">object</a> to end</tt></dd></dl> |
| |
| <dl><dt><a name="RecordResultSet-count"><strong>count</strong></a>(...)</dt><dd><tt>L.<a href="#RecordResultSet-count">count</a>(value) -> integer -- return number of occurrences of value</tt></dd></dl> |
| |
| <dl><dt><a name="RecordResultSet-extend"><strong>extend</strong></a>(...)</dt><dd><tt>L.<a href="#RecordResultSet-extend">extend</a>(iterable) -- extend <a href="__builtin__.html#list">list</a> by appending elements from the iterable</tt></dd></dl> |
| |
| <dl><dt><a name="RecordResultSet-index"><strong>index</strong></a>(...)</dt><dd><tt>L.<a href="#RecordResultSet-index">index</a>(value, [start, [stop]]) -> integer -- return first index of value.<br> |
| Raises ValueError if the value is not present.</tt></dd></dl> |
| |
| <dl><dt><a name="RecordResultSet-insert"><strong>insert</strong></a>(...)</dt><dd><tt>L.<a href="#RecordResultSet-insert">insert</a>(index, <a href="__builtin__.html#object">object</a>) -- insert <a href="__builtin__.html#object">object</a> before index</tt></dd></dl> |
| |
| <dl><dt><a name="RecordResultSet-pop"><strong>pop</strong></a>(...)</dt><dd><tt>L.<a href="#RecordResultSet-pop">pop</a>([index]) -> item -- remove and return item at index (default last).<br> |
| Raises IndexError if <a href="__builtin__.html#list">list</a> is empty or index is out of range.</tt></dd></dl> |
| |
| <dl><dt><a name="RecordResultSet-remove"><strong>remove</strong></a>(...)</dt><dd><tt>L.<a href="#RecordResultSet-remove">remove</a>(value) -- remove first occurrence of value.<br> |
| Raises ValueError if the value is not present.</tt></dd></dl> |
| |
| <dl><dt><a name="RecordResultSet-reverse"><strong>reverse</strong></a>(...)</dt><dd><tt>L.<a href="#RecordResultSet-reverse">reverse</a>() -- reverse *IN PLACE*</tt></dd></dl> |
| |
| <dl><dt><a name="RecordResultSet-sort"><strong>sort</strong></a>(...)</dt><dd><tt>L.<a href="#RecordResultSet-sort">sort</a>(cmp=None, key=None, reverse=False) -- stable sort *IN PLACE*;<br> |
| cmp(x, y) -> -1, 0, 1</tt></dd></dl> |
| |
| <hr> |
| Data and other attributes inherited from <a href="__builtin__.html#list">__builtin__.list</a>:<br> |
| <dl><dt><strong>__hash__</strong> = None</dl> |
| |
| <dl><dt><strong>__new__</strong> = <built-in method __new__ of type object><dd><tt>T.<a href="#RecordResultSet-__new__">__new__</a>(S, ...) -> a new <a href="__builtin__.html#object">object</a> with type S, a subtype of T</tt></dl> |
| |
| </td></tr></table> <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="Table">class <strong>Table</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr> |
| |
| <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> |
| <td width="100%">Methods defined here:<br> |
| <dl><dt><a name="Table-AddRecord"><strong>AddRecord</strong></a>(self, data)</dt><dd><tt>Adds a new row to this worksheet.<br> |
| <br> |
| Args:<br> |
| data: dict of strings Mapping of string values to column names. <br> |
| <br> |
| Returns:<br> |
| <a href="#Record">Record</a> which represents this row of the spreadsheet.</tt></dd></dl> |
| |
| <dl><dt><a name="Table-Delete"><strong>Delete</strong></a>(self)</dt><dd><tt>Deletes this worksheet from the spreadsheet.</tt></dd></dl> |
| |
| <dl><dt><a name="Table-FindRecords"><strong>FindRecords</strong></a>(self, query_string)</dt><dd><tt>Performs a query against the worksheet to find rows which match.<br> |
| <br> |
| For details on query string syntax see the section on sq under<br> |
| <a href="http://code.google.com/apis/spreadsheets/reference.html#list_Parameters">http://code.google.com/apis/spreadsheets/reference.html#list_Parameters</a><br> |
| <br> |
| Args:<br> |
| query_string: str Examples: 'name == john' to find all rows with john<br> |
| in the name column, '(cost < 19.50 and name != toy) or cost > 500'<br> |
| <br> |
| Returns:<br> |
| <a href="#RecordResultSet">RecordResultSet</a> with the first group of matches.</tt></dd></dl> |
| |
| <dl><dt><a name="Table-GetRecord"><strong>GetRecord</strong></a>(self, row_id<font color="#909090">=None</font>, row_number<font color="#909090">=None</font>)</dt><dd><tt>Gets a single record from the worksheet based on row ID or number.<br> |
| <br> |
| Args:<br> |
| row_id: The ID for the individual row.<br> |
| row_number: str or int The position of the desired row. Numbering <br> |
| begins at 1, which refers to the second row in the worksheet since<br> |
| the first row is used for column names.<br> |
| <br> |
| Returns:<br> |
| <a href="#Record">Record</a> for the desired row.</tt></dd></dl> |
| |
| <dl><dt><a name="Table-GetRecords"><strong>GetRecords</strong></a>(self, start_row, end_row)</dt><dd><tt>Gets all rows between the start and end row numbers inclusive.<br> |
| <br> |
| Args:<br> |
| start_row: str or int<br> |
| end_row: str or int<br> |
| <br> |
| Returns:<br> |
| <a href="#RecordResultSet">RecordResultSet</a> for the desired rows.</tt></dd></dl> |
| |
| <dl><dt><a name="Table-LookupFields"><strong>LookupFields</strong></a>(self)</dt><dd><tt>Queries to find the column names in the first row of the worksheet.<br> |
| <br> |
| Useful when you have retrieved the table from the server and you don't <br> |
| know the column names.</tt></dd></dl> |
| |
| <dl><dt><a name="Table-SetFields"><strong>SetFields</strong></a>(self, fields)</dt><dd><tt>Changes the contents of the cells in the first row of this worksheet.<br> |
| <br> |
| Args:<br> |
| fields: <a href="__builtin__.html#list">list</a> of strings The names in the <a href="__builtin__.html#list">list</a> comprise the<br> |
| first row of the worksheet. These names are converted into XML<br> |
| tags by the server. To avoid changes during the translation<br> |
| process I recommend using all lowercase alphabetic names. For<br> |
| example ['somelongname', 'theothername']</tt></dd></dl> |
| |
| <dl><dt><a name="Table-__init__"><strong>__init__</strong></a>(self, name<font color="#909090">=None</font>, worksheet_entry<font color="#909090">=None</font>, database_client<font color="#909090">=None</font>, spreadsheet_key<font color="#909090">=None</font>, fields<font color="#909090">=None</font>)</dt></dl> |
| |
| <hr> |
| Data descriptors defined here:<br> |
| <dl><dt><strong>__dict__</strong></dt> |
| <dd><tt>dictionary for instance variables (if defined)</tt></dd> |
| </dl> |
| <dl><dt><strong>__weakref__</strong></dt> |
| <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| </dl> |
| </td></tr></table></td></tr></table><p> |
| <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| <tr bgcolor="#eeaa77"> |
| <td colspan=3 valign=bottom> <br> |
| <font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr> |
| |
| <tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td> |
| <td width="100%"><dl><dt><a name="-ConvertStringsToColumnHeaders"><strong>ConvertStringsToColumnHeaders</strong></a>(proposed_headers)</dt><dd><tt>Converts a <a href="__builtin__.html#list">list</a> of strings to column names which spreadsheets accepts.<br> |
| <br> |
| When setting values in a record, the keys which represent column names must<br> |
| fit certain rules. They are all lower case, contain no spaces or special<br> |
| characters. If two columns have the same name after being sanitized, the <br> |
| columns further to the right have _2, _3 _4, etc. appended to them.<br> |
| <br> |
| If there are column names which consist of all special characters, or if<br> |
| the column header is blank, an obfuscated value will be used for a column<br> |
| name. This method does not handle blank column names or column names with<br> |
| only special characters.</tt></dd></dl> |
| </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>__author__</strong> = 'api.jscudder (Jeffrey Scudder)'</td></tr></table><p> |
| <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| <tr bgcolor="#7799ee"> |
| <td colspan=3 valign=bottom> <br> |
| <font color="#ffffff" face="helvetica, arial"><big><strong>Author</strong></big></font></td></tr> |
| |
| <tr><td bgcolor="#7799ee"><tt> </tt></td><td> </td> |
| <td width="100%">api.jscudder (Jeffrey Scudder)</td></tr></table> |
| </body></html> |