Joe Gregorio | 6e53703 | 2011-02-09 23:04:26 -0500 | [diff] [blame] | 1 | |
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| 3 | <html><head><title>Python: module oauth2client.appengine</title> |
| 4 | </head><body bgcolor="#f0f0f8"> |
| 5 | |
| 6 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> |
| 7 | <tr bgcolor="#7799ee"> |
| 8 | <td valign=bottom> <br> |
| 9 | <font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="oauth2client.html"><font color="#ffffff">oauth2client</font></a>.appengine</strong></big></big></font></td |
| 10 | ><td align=right valign=bottom |
Joe Gregorio | 0250385 | 2011-08-31 09:07:55 -0400 | [diff] [blame] | 11 | ><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/jcgregorio/projects/google-api-python-client/oauth2client/appengine.py">/home/jcgregorio/projects/google-api-python-client/oauth2client/appengine.py</a></font></td></tr></table> |
Joe Gregorio | 6e53703 | 2011-02-09 23:04:26 -0500 | [diff] [blame] | 12 | <p><tt>Utilities for Google App Engine<br> |
| 13 | <br> |
Joe Gregorio | 3b79fa8 | 2011-02-17 11:47:17 -0500 | [diff] [blame] | 14 | Utilities for making it easier to use OAuth 2.0 on Google App Engine.</tt></p> |
Joe Gregorio | 6e53703 | 2011-02-09 23:04:26 -0500 | [diff] [blame] | 15 | <p> |
| 16 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 17 | <tr bgcolor="#aa55cc"> |
| 18 | <td colspan=3 valign=bottom> <br> |
| 19 | <font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> |
| 20 | |
| 21 | <tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> |
Joe Gregorio | 90e7ec2 | 2011-07-06 10:09:20 -0400 | [diff] [blame] | 22 | <td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="google.appengine.api.app_identity.app_identity.html">google.appengine.api.app_identity.app_identity</a><br> |
| 23 | <a href="base64.html">base64</a><br> |
| 24 | <a href="google.appengine.ext.db.html">google.appengine.ext.db</a><br> |
| 25 | </td><td width="25%" valign=top><a href="httplib2.html">httplib2</a><br> |
| 26 | <a href="logging.html">logging</a><br> |
| 27 | <a href="google.appengine.api.memcache.html">google.appengine.api.memcache</a><br> |
Joe Gregorio | 6e53703 | 2011-02-09 23:04:26 -0500 | [diff] [blame] | 28 | </td><td width="25%" valign=top><a href="pickle.html">pickle</a><br> |
Joe Gregorio | 90e7ec2 | 2011-07-06 10:09:20 -0400 | [diff] [blame] | 29 | <a href="simplejson.html">simplejson</a><br> |
| 30 | <a href="time.html">time</a><br> |
| 31 | </td><td width="25%" valign=top><a href="google.appengine.api.users.html">google.appengine.api.users</a><br> |
| 32 | <a href="google.appengine.ext.webapp.html">google.appengine.ext.webapp</a><br> |
| 33 | </td></tr></table></td></tr></table><p> |
Joe Gregorio | 6e53703 | 2011-02-09 23:04:26 -0500 | [diff] [blame] | 34 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 35 | <tr bgcolor="#ee77aa"> |
| 36 | <td colspan=3 valign=bottom> <br> |
| 37 | <font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr> |
| 38 | |
| 39 | <tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td> |
| 40 | <td width="100%"><dl> |
Joe Gregorio | 90e7ec2 | 2011-07-06 10:09:20 -0400 | [diff] [blame] | 41 | <dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a> |
| 42 | </font></dt><dd> |
| 43 | <dl> |
| 44 | <dt><font face="helvetica, arial"><a href="oauth2client.appengine.html#OAuth2Decorator">OAuth2Decorator</a> |
| 45 | </font></dt></dl> |
| 46 | </dd> |
| 47 | <dt><font face="helvetica, arial"><a href="google.appengine.ext.db.html#Model">google.appengine.ext.db.Model</a>(<a href="__builtin__.html#object">__builtin__.object</a>) |
| 48 | </font></dt><dd> |
| 49 | <dl> |
| 50 | <dt><font face="helvetica, arial"><a href="oauth2client.appengine.html#CredentialsModel">CredentialsModel</a> |
| 51 | </font></dt></dl> |
| 52 | </dd> |
Joe Gregorio | 6e53703 | 2011-02-09 23:04:26 -0500 | [diff] [blame] | 53 | <dt><font face="helvetica, arial"><a href="google.appengine.ext.db.html#Property">google.appengine.ext.db.Property</a>(<a href="__builtin__.html#object">__builtin__.object</a>) |
| 54 | </font></dt><dd> |
| 55 | <dl> |
| 56 | <dt><font face="helvetica, arial"><a href="oauth2client.appengine.html#CredentialsProperty">CredentialsProperty</a> |
| 57 | </font></dt><dt><font face="helvetica, arial"><a href="oauth2client.appengine.html#FlowProperty">FlowProperty</a> |
| 58 | </font></dt></dl> |
| 59 | </dd> |
Joe Gregorio | 90e7ec2 | 2011-07-06 10:09:20 -0400 | [diff] [blame] | 60 | <dt><font face="helvetica, arial"><a href="google.appengine.ext.webapp.html#RequestHandler">google.appengine.ext.webapp.RequestHandler</a>(<a href="__builtin__.html#object">__builtin__.object</a>) |
| 61 | </font></dt><dd> |
| 62 | <dl> |
| 63 | <dt><font face="helvetica, arial"><a href="oauth2client.appengine.html#OAuth2Handler">OAuth2Handler</a> |
| 64 | </font></dt></dl> |
| 65 | </dd> |
| 66 | <dt><font face="helvetica, arial"><a href="oauth2client.client.html#AssertionCredentials">oauth2client.client.AssertionCredentials</a>(<a href="oauth2client.client.html#OAuth2Credentials">oauth2client.client.OAuth2Credentials</a>) |
| 67 | </font></dt><dd> |
| 68 | <dl> |
| 69 | <dt><font face="helvetica, arial"><a href="oauth2client.appengine.html#AppAssertionCredentials">AppAssertionCredentials</a> |
| 70 | </font></dt></dl> |
| 71 | </dd> |
Joe Gregorio | 3b79fa8 | 2011-02-17 11:47:17 -0500 | [diff] [blame] | 72 | <dt><font face="helvetica, arial"><a href="oauth2client.client.html#Storage">oauth2client.client.Storage</a>(<a href="__builtin__.html#object">__builtin__.object</a>) |
| 73 | </font></dt><dd> |
| 74 | <dl> |
| 75 | <dt><font face="helvetica, arial"><a href="oauth2client.appengine.html#StorageByKeyName">StorageByKeyName</a> |
| 76 | </font></dt></dl> |
| 77 | </dd> |
Joe Gregorio | 6e53703 | 2011-02-09 23:04:26 -0500 | [diff] [blame] | 78 | </dl> |
| 79 | <p> |
| 80 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 81 | <tr bgcolor="#ffc8d8"> |
| 82 | <td colspan=3 valign=bottom> <br> |
Joe Gregorio | 90e7ec2 | 2011-07-06 10:09:20 -0400 | [diff] [blame] | 83 | <font color="#000000" face="helvetica, arial"><a name="AppAssertionCredentials">class <strong>AppAssertionCredentials</strong></a>(<a href="oauth2client.client.html#AssertionCredentials">oauth2client.client.AssertionCredentials</a>)</font></td></tr> |
| 84 | |
| 85 | <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> |
| 86 | <td colspan=2><tt>Credentials <a href="__builtin__.html#object">object</a> for App Engine Assertion Grants<br> |
| 87 | <br> |
| 88 | This <a href="__builtin__.html#object">object</a> will allow an App Engine application to identify itself to Google<br> |
| 89 | and other OAuth 2.0 servers that can verify assertions. It can be used for<br> |
| 90 | the purpose of accessing data stored under an account assigned to the App<br> |
| 91 | Engine application itself. The algorithm used for generating the assertion is<br> |
| 92 | the Signed JSON Web Token (JWT) algorithm. Additional details can be found at<br> |
| 93 | the following link:<br> |
| 94 | <br> |
| 95 | <a href="http://self-issued.info/docs/draft-jones-json-web-token.html">http://self-issued.info/docs/draft-jones-json-web-token.html</a><br> |
| 96 | <br> |
| 97 | This credential does not require a flow to instantiate because it represents<br> |
| 98 | a two legged flow, and therefore has all of the required information to<br> |
| 99 | generate and refresh its own access tokens.<br> |
| 100 | <br> |
| 101 | AssertionFlowCredentials objects may be safely pickled and unpickled.<br> </tt></td></tr> |
| 102 | <tr><td> </td> |
| 103 | <td width="100%"><dl><dt>Method resolution order:</dt> |
| 104 | <dd><a href="oauth2client.appengine.html#AppAssertionCredentials">AppAssertionCredentials</a></dd> |
| 105 | <dd><a href="oauth2client.client.html#AssertionCredentials">oauth2client.client.AssertionCredentials</a></dd> |
| 106 | <dd><a href="oauth2client.client.html#OAuth2Credentials">oauth2client.client.OAuth2Credentials</a></dd> |
| 107 | <dd><a href="oauth2client.client.html#Credentials">oauth2client.client.Credentials</a></dd> |
| 108 | <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> |
| 109 | </dl> |
| 110 | <hr> |
| 111 | Methods defined here:<br> |
Joe Gregorio | 0250385 | 2011-08-31 09:07:55 -0400 | [diff] [blame] | 112 | <dl><dt><a name="AppAssertionCredentials-__init__"><strong>__init__</strong></a>(self, scope, audience<font color="#909090">='https://accounts.google.com/o/oauth2/token'</font>, assertion_type<font color="#909090">='http://oauth.net/grant_type/jwt/1.0/bearer'</font>, token_uri<font color="#909090">='https://accounts.google.com/o/oauth2/token'</font>, **kwargs)</dt><dd><tt>Constructor for <a href="#AppAssertionCredentials">AppAssertionCredentials</a><br> |
Joe Gregorio | 90e7ec2 | 2011-07-06 10:09:20 -0400 | [diff] [blame] | 113 | <br> |
| 114 | Args:<br> |
| 115 | scope: string, scope of the credentials being requested.<br> |
Joe Gregorio | 90e7ec2 | 2011-07-06 10:09:20 -0400 | [diff] [blame] | 116 | audience: string, The audience, or verifier of the assertion. For<br> |
| 117 | convenience defaults to Google's audience.<br> |
| 118 | assertion_type: string, Type name that will identify the format of the<br> |
| 119 | assertion string. For convience, defaults to the JSON Web Token (JWT)<br> |
| 120 | assertion type string.<br> |
| 121 | token_uri: string, URI for token endpoint. For convenience<br> |
| 122 | defaults to Google's endpoints but any OAuth 2.0 provider can be used.</tt></dd></dl> |
| 123 | |
| 124 | <hr> |
| 125 | Methods inherited from <a href="oauth2client.client.html#OAuth2Credentials">oauth2client.client.OAuth2Credentials</a>:<br> |
| 126 | <dl><dt><a name="AppAssertionCredentials-__getstate__"><strong>__getstate__</strong></a>(self)</dt><dd><tt>Trim the state down to something that can be pickled.</tt></dd></dl> |
| 127 | |
| 128 | <dl><dt><a name="AppAssertionCredentials-__setstate__"><strong>__setstate__</strong></a>(self, state)</dt><dd><tt>Reconstitute the state of the <a href="__builtin__.html#object">object</a> from being pickled.</tt></dd></dl> |
| 129 | |
| 130 | <dl><dt><a name="AppAssertionCredentials-authorize"><strong>authorize</strong></a>(self, http)</dt><dd><tt>Authorize an httplib2.Http instance with these credentials.<br> |
| 131 | <br> |
| 132 | Args:<br> |
| 133 | http: An instance of httplib2.Http<br> |
| 134 | or something that acts like it.<br> |
| 135 | <br> |
| 136 | Returns:<br> |
| 137 | A modified instance of http that was passed in.<br> |
| 138 | <br> |
| 139 | Example:<br> |
| 140 | <br> |
| 141 | h = httplib2.Http()<br> |
| 142 | h = credentials.<a href="#AppAssertionCredentials-authorize">authorize</a>(h)<br> |
| 143 | <br> |
| 144 | You can't create a new OAuth<br> |
| 145 | subclass of httplib2.Authenication because<br> |
| 146 | it never gets passed the absolute URI, which is<br> |
| 147 | needed for signing. So instead we have to overload<br> |
| 148 | 'request' with a closure that adds in the<br> |
| 149 | Authorization header and then calls the original version<br> |
| 150 | of 'request()'.</tt></dd></dl> |
| 151 | |
| 152 | <dl><dt><a name="AppAssertionCredentials-set_store"><strong>set_store</strong></a>(self, store)</dt><dd><tt>Set the storage for the credential.<br> |
| 153 | <br> |
| 154 | Args:<br> |
| 155 | store: callable, a callable that when passed a Credential<br> |
| 156 | will store the credential back to where it came from.<br> |
| 157 | This is needed to store the latest access_token if it<br> |
| 158 | has expired and been refreshed.</tt></dd></dl> |
| 159 | |
| 160 | <hr> |
| 161 | Data descriptors inherited from <a href="oauth2client.client.html#OAuth2Credentials">oauth2client.client.OAuth2Credentials</a>:<br> |
| 162 | <dl><dt><strong>invalid</strong></dt> |
| 163 | <dd><tt>True if the credentials are invalid, such as being revoked.</tt></dd> |
| 164 | </dl> |
| 165 | <hr> |
| 166 | Data descriptors inherited from <a href="oauth2client.client.html#Credentials">oauth2client.client.Credentials</a>:<br> |
| 167 | <dl><dt><strong>__dict__</strong></dt> |
| 168 | <dd><tt>dictionary for instance variables (if defined)</tt></dd> |
| 169 | </dl> |
| 170 | <dl><dt><strong>__weakref__</strong></dt> |
| 171 | <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| 172 | </dl> |
| 173 | </td></tr></table> <p> |
| 174 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 175 | <tr bgcolor="#ffc8d8"> |
| 176 | <td colspan=3 valign=bottom> <br> |
| 177 | <font color="#000000" face="helvetica, arial"><a name="CredentialsModel">class <strong>CredentialsModel</strong></a>(<a href="google.appengine.ext.db.html#Model">google.appengine.ext.db.Model</a>)</font></td></tr> |
| 178 | |
| 179 | <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> |
| 180 | <td colspan=2><tt><a href="oauth2client.client.html#Storage">Storage</a> for OAuth 2.0 Credentials<br> |
| 181 | <br> |
| 182 | <a href="oauth2client.client.html#Storage">Storage</a> of the model is keyed by the user.user_id().<br> </tt></td></tr> |
| 183 | <tr><td> </td> |
| 184 | <td width="100%"><dl><dt>Method resolution order:</dt> |
| 185 | <dd><a href="oauth2client.appengine.html#CredentialsModel">CredentialsModel</a></dd> |
| 186 | <dd><a href="google.appengine.ext.db.html#Model">google.appengine.ext.db.Model</a></dd> |
| 187 | <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> |
| 188 | </dl> |
| 189 | <hr> |
| 190 | Data descriptors defined here:<br> |
| 191 | <dl><dt><strong>credentials</strong></dt> |
| 192 | <dd><tt>App Engine datastore Property for Credentials.<br> |
| 193 | <br> |
| 194 | Utility property that allows easy storage and retrieval of<br> |
| 195 | oath2client.Credentials</tt></dd> |
| 196 | </dl> |
| 197 | <hr> |
| 198 | Methods inherited from <a href="google.appengine.ext.db.html#Model">google.appengine.ext.db.Model</a>:<br> |
| 199 | <dl><dt><a name="CredentialsModel-__init__"><strong>__init__</strong></a>(self, parent<font color="#909090">=None</font>, key_name<font color="#909090">=None</font>, _app<font color="#909090">=None</font>, _from_entity<font color="#909090">=False</font>, **kwds)</dt><dd><tt>Creates a new instance of this model.<br> |
| 200 | <br> |
| 201 | To create a new entity, you instantiate a model and then call <a href="#CredentialsModel-put">put</a>(),<br> |
| 202 | which saves the entity to the datastore:<br> |
| 203 | <br> |
| 204 | person = Person()<br> |
| 205 | person.name = 'Bret'<br> |
| 206 | person.<a href="#CredentialsModel-put">put</a>()<br> |
| 207 | <br> |
| 208 | You can initialize properties in the model in the constructor with keyword<br> |
| 209 | arguments:<br> |
| 210 | <br> |
| 211 | person = Person(name='Bret')<br> |
| 212 | <br> |
| 213 | We initialize all other properties to the default value (as defined by the<br> |
| 214 | properties in the model definition) if they are not provided in the<br> |
| 215 | constructor.<br> |
| 216 | <br> |
| 217 | Args:<br> |
| 218 | parent: Parent instance for this instance or None, indicating a top-<br> |
| 219 | level instance.<br> |
| 220 | key_name: Name for new model instance.<br> |
| 221 | _from_entity: Intentionally undocumented.<br> |
| 222 | kwds: Keyword arguments mapping to properties of model. Also:<br> |
| 223 | key: Key instance for this instance, if provided makes parent and<br> |
| 224 | key_name redundant (they do not need to be set but if they are<br> |
| 225 | they must match the key).</tt></dd></dl> |
| 226 | |
| 227 | <dl><dt><a name="CredentialsModel-delete"><strong>delete</strong></a>(self, **kwargs)</dt><dd><tt>Deletes this entity from the datastore.<br> |
| 228 | <br> |
| 229 | Args:<br> |
| 230 | config: datastore_rpc.Configuration to use for this request.<br> |
| 231 | <br> |
| 232 | Raises:<br> |
| 233 | TransactionFailedError if the data could not be committed.</tt></dd></dl> |
| 234 | |
| 235 | <dl><dt><a name="CredentialsModel-dynamic_properties"><strong>dynamic_properties</strong></a>(self)</dt><dd><tt>Returns a list of all dynamic properties defined for instance.</tt></dd></dl> |
| 236 | |
| 237 | <dl><dt><a name="CredentialsModel-has_key"><strong>has_key</strong></a>(self)</dt><dd><tt>Determine if this model instance has a complete key.<br> |
| 238 | <br> |
| 239 | When not using a fully self-assigned Key, ids are not assigned until the<br> |
| 240 | data is saved to the Datastore, but instances with a key name always have<br> |
| 241 | a full key.<br> |
| 242 | <br> |
| 243 | Returns:<br> |
| 244 | True if the <a href="__builtin__.html#object">object</a> has been persisted to the datastore or has a key<br> |
| 245 | or has a key_name, otherwise False.</tt></dd></dl> |
| 246 | |
| 247 | <dl><dt><a name="CredentialsModel-instance_properties"><strong>instance_properties</strong></a>(self)</dt><dd><tt>Alias for dyanmic_properties.</tt></dd></dl> |
| 248 | |
| 249 | <dl><dt><a name="CredentialsModel-is_saved"><strong>is_saved</strong></a>(self)</dt><dd><tt>Determine if entity is persisted in the datastore.<br> |
| 250 | <br> |
| 251 | New instances of <a href="google.appengine.ext.db.html#Model">Model</a> do not start out saved in the data. Objects which<br> |
| 252 | are saved to or loaded from the Datastore will have a True saved state.<br> |
| 253 | <br> |
| 254 | Returns:<br> |
| 255 | True if <a href="__builtin__.html#object">object</a> has been persisted to the datastore, otherwise False.</tt></dd></dl> |
| 256 | |
| 257 | <dl><dt><a name="CredentialsModel-key"><strong>key</strong></a>(self)</dt><dd><tt>Unique key for this entity.<br> |
| 258 | <br> |
| 259 | This property is only available if this entity is already stored in the<br> |
| 260 | datastore or if it has a full key, so it is available if this entity was<br> |
| 261 | fetched returned from a query, or after <a href="#CredentialsModel-put">put</a>() is called the first time<br> |
| 262 | for new entities, or if a complete key was given when constructed.<br> |
| 263 | <br> |
| 264 | Returns:<br> |
| 265 | Datastore key of persisted entity.<br> |
| 266 | <br> |
| 267 | Raises:<br> |
| 268 | NotSavedError when entity is not persistent.</tt></dd></dl> |
| 269 | |
| 270 | <dl><dt><a name="CredentialsModel-parent"><strong>parent</strong></a>(self)</dt><dd><tt>Get the parent of the model instance.<br> |
| 271 | <br> |
| 272 | Returns:<br> |
| 273 | Parent of contained entity or parent provided in constructor, None if<br> |
| 274 | instance has no parent.</tt></dd></dl> |
| 275 | |
| 276 | <dl><dt><a name="CredentialsModel-parent_key"><strong>parent_key</strong></a>(self)</dt><dd><tt>Get the parent's key.<br> |
| 277 | <br> |
| 278 | This method is useful for avoiding a potential fetch from the datastore<br> |
| 279 | but still get information about the instances parent.<br> |
| 280 | <br> |
| 281 | Returns:<br> |
| 282 | Parent key of entity, None if there is no parent.</tt></dd></dl> |
| 283 | |
| 284 | <dl><dt><a name="CredentialsModel-put"><strong>put</strong></a>(self, **kwargs)</dt><dd><tt>Writes this model instance to the datastore.<br> |
| 285 | <br> |
| 286 | If this instance is new, we add an entity to the datastore.<br> |
| 287 | Otherwise, we update this instance, and the key will remain the<br> |
| 288 | same.<br> |
| 289 | <br> |
| 290 | Args:<br> |
| 291 | config: datastore_rpc.Configuration to use for this request.<br> |
| 292 | <br> |
| 293 | Returns:<br> |
| 294 | The key of the instance (either the existing key or a new key).<br> |
| 295 | <br> |
| 296 | Raises:<br> |
| 297 | TransactionFailedError if the data could not be committed.</tt></dd></dl> |
| 298 | |
| 299 | <dl><dt><a name="CredentialsModel-save"><strong>save</strong></a> = put(self, **kwargs)</dt><dd><tt>Writes this model instance to the datastore.<br> |
| 300 | <br> |
| 301 | If this instance is new, we add an entity to the datastore.<br> |
| 302 | Otherwise, we update this instance, and the key will remain the<br> |
| 303 | same.<br> |
| 304 | <br> |
| 305 | Args:<br> |
| 306 | config: datastore_rpc.Configuration to use for this request.<br> |
| 307 | <br> |
| 308 | Returns:<br> |
| 309 | The key of the instance (either the existing key or a new key).<br> |
| 310 | <br> |
| 311 | Raises:<br> |
| 312 | TransactionFailedError if the data could not be committed.</tt></dd></dl> |
| 313 | |
| 314 | <dl><dt><a name="CredentialsModel-to_xml"><strong>to_xml</strong></a>(self, _entity_class<font color="#909090">=<class 'google.appengine.api.datastore.Entity'></font>)</dt><dd><tt>Generate an XML representation of this model instance.<br> |
| 315 | <br> |
| 316 | atom and gd:namespace properties are converted to XML according to their<br> |
| 317 | respective schemas. For more information, see:<br> |
| 318 | <br> |
| 319 | <a href="http://www.atomenabled.org/developers/syndication/">http://www.atomenabled.org/developers/syndication/</a><br> |
| 320 | <a href="http://code.google.com/apis/gdata/common-elements.html">http://code.google.com/apis/gdata/common-elements.html</a></tt></dd></dl> |
| 321 | |
| 322 | <hr> |
| 323 | Class methods inherited from <a href="google.appengine.ext.db.html#Model">google.appengine.ext.db.Model</a>:<br> |
| 324 | <dl><dt><a name="CredentialsModel-all"><strong>all</strong></a>(cls, **kwds)<font color="#909090"><font face="helvetica, arial"> from <a href="google.appengine.ext.db.html#PropertiedClass">google.appengine.ext.db.PropertiedClass</a></font></font></dt><dd><tt>Returns a query over all instances of this model from the datastore.<br> |
| 325 | <br> |
| 326 | Returns:<br> |
| 327 | Query that will retrieve all instances from entity collection.</tt></dd></dl> |
| 328 | |
| 329 | <dl><dt><a name="CredentialsModel-entity_type"><strong>entity_type</strong></a>(cls)<font color="#909090"><font face="helvetica, arial"> from <a href="google.appengine.ext.db.html#PropertiedClass">google.appengine.ext.db.PropertiedClass</a></font></font></dt><dd><tt>Soon to be removed alias for kind.</tt></dd></dl> |
| 330 | |
| 331 | <dl><dt><a name="CredentialsModel-fields"><strong>fields</strong></a>(cls)<font color="#909090"><font face="helvetica, arial"> from <a href="google.appengine.ext.db.html#PropertiedClass">google.appengine.ext.db.PropertiedClass</a></font></font></dt><dd><tt>Soon to be removed alias for properties.</tt></dd></dl> |
| 332 | |
| 333 | <dl><dt><a name="CredentialsModel-from_entity"><strong>from_entity</strong></a>(cls, entity)<font color="#909090"><font face="helvetica, arial"> from <a href="google.appengine.ext.db.html#PropertiedClass">google.appengine.ext.db.PropertiedClass</a></font></font></dt><dd><tt>Converts the entity representation of this model to an instance.<br> |
| 334 | <br> |
| 335 | Converts datastore.Entity instance to an instance of cls.<br> |
| 336 | <br> |
| 337 | Args:<br> |
| 338 | entity: Entity loaded directly from datastore.<br> |
| 339 | <br> |
| 340 | Raises:<br> |
| 341 | KindError when cls is incorrect model for entity.</tt></dd></dl> |
| 342 | |
| 343 | <dl><dt><a name="CredentialsModel-get"><strong>get</strong></a>(cls, keys, **kwargs)<font color="#909090"><font face="helvetica, arial"> from <a href="google.appengine.ext.db.html#PropertiedClass">google.appengine.ext.db.PropertiedClass</a></font></font></dt><dd><tt>Fetch instance from the datastore of a specific <a href="google.appengine.ext.db.html#Model">Model</a> type using key.<br> |
| 344 | <br> |
| 345 | We support Key objects and string keys (we convert them to Key objects<br> |
| 346 | automatically).<br> |
| 347 | <br> |
| 348 | Useful for ensuring that specific instance types are retrieved from the<br> |
| 349 | datastore. It also helps that the source code clearly indicates what<br> |
| 350 | kind of <a href="__builtin__.html#object">object</a> is being retreived. Example:<br> |
| 351 | <br> |
| 352 | story = Story.<a href="#CredentialsModel-get">get</a>(story_key)<br> |
| 353 | <br> |
| 354 | Args:<br> |
| 355 | keys: Key within datastore entity collection to find; or string key;<br> |
| 356 | or list of Keys or string keys.<br> |
| 357 | config: datastore_rpc.Configuration to use for this request.<br> |
| 358 | <br> |
| 359 | Returns:<br> |
| 360 | If a single key was given: a <a href="google.appengine.ext.db.html#Model">Model</a> instance associated with key<br> |
| 361 | for provided class if it exists in the datastore, otherwise<br> |
| 362 | None; if a list of keys was given: a list whose items are either<br> |
| 363 | a <a href="google.appengine.ext.db.html#Model">Model</a> instance or None.<br> |
| 364 | <br> |
| 365 | Raises:<br> |
| 366 | KindError if any of the retreived objects are not instances of the<br> |
| 367 | type associated with call to 'get'.</tt></dd></dl> |
| 368 | |
| 369 | <dl><dt><a name="CredentialsModel-get_by_id"><strong>get_by_id</strong></a>(cls, ids, parent<font color="#909090">=None</font>, **kwargs)<font color="#909090"><font face="helvetica, arial"> from <a href="google.appengine.ext.db.html#PropertiedClass">google.appengine.ext.db.PropertiedClass</a></font></font></dt><dd><tt>Get instance of <a href="google.appengine.ext.db.html#Model">Model</a> class by id.<br> |
| 370 | <br> |
| 371 | Args:<br> |
| 372 | key_names: A single id or a list of ids.<br> |
| 373 | parent: Parent of instances to get. Can be a model or key.<br> |
| 374 | config: datastore_rpc.Configuration to use for this request.</tt></dd></dl> |
| 375 | |
| 376 | <dl><dt><a name="CredentialsModel-get_by_key_name"><strong>get_by_key_name</strong></a>(cls, key_names, parent<font color="#909090">=None</font>, **kwargs)<font color="#909090"><font face="helvetica, arial"> from <a href="google.appengine.ext.db.html#PropertiedClass">google.appengine.ext.db.PropertiedClass</a></font></font></dt><dd><tt>Get instance of <a href="google.appengine.ext.db.html#Model">Model</a> class by its key's name.<br> |
| 377 | <br> |
| 378 | Args:<br> |
| 379 | key_names: A single key-name or a list of key-names.<br> |
| 380 | parent: Parent of instances to get. Can be a model or key.<br> |
| 381 | config: datastore_rpc.Configuration to use for this request.</tt></dd></dl> |
| 382 | |
| 383 | <dl><dt><a name="CredentialsModel-get_or_insert"><strong>get_or_insert</strong></a>(cls, key_name, **kwds)<font color="#909090"><font face="helvetica, arial"> from <a href="google.appengine.ext.db.html#PropertiedClass">google.appengine.ext.db.PropertiedClass</a></font></font></dt><dd><tt>Transactionally retrieve or create an instance of <a href="google.appengine.ext.db.html#Model">Model</a> class.<br> |
| 384 | <br> |
| 385 | This acts much like the Python dictionary setdefault() method, where we<br> |
| 386 | first try to retrieve a <a href="google.appengine.ext.db.html#Model">Model</a> instance with the given key name and parent.<br> |
| 387 | If it's not present, then we create a new instance (using the *kwds<br> |
| 388 | supplied) and insert that with the supplied key name.<br> |
| 389 | <br> |
| 390 | Subsequent calls to this method with the same key_name and parent will<br> |
| 391 | always yield the same entity (though not the same actual <a href="__builtin__.html#object">object</a> instance),<br> |
| 392 | regardless of the *kwds supplied. If the specified entity has somehow<br> |
| 393 | been deleted separately, then the next call will create a new entity and<br> |
| 394 | return it.<br> |
| 395 | <br> |
| 396 | If the 'parent' keyword argument is supplied, it must be a <a href="google.appengine.ext.db.html#Model">Model</a> instance.<br> |
| 397 | It will be used as the parent of the new instance of this <a href="google.appengine.ext.db.html#Model">Model</a> class if<br> |
| 398 | one is created.<br> |
| 399 | <br> |
| 400 | This method is especially useful for having just one unique entity for<br> |
| 401 | a specific identifier. Insertion/retrieval is done transactionally, which<br> |
| 402 | guarantees uniqueness.<br> |
| 403 | <br> |
| 404 | Example usage:<br> |
| 405 | <br> |
| 406 | class WikiTopic(db.<a href="google.appengine.ext.db.html#Model">Model</a>):<br> |
| 407 | creation_date = db.DatetimeProperty(auto_now_add=True)<br> |
| 408 | body = db.TextProperty(required=True)<br> |
| 409 | <br> |
| 410 | # The first time through we'll create the new topic.<br> |
| 411 | wiki_word = 'CommonIdioms'<br> |
| 412 | topic = WikiTopic.<a href="#CredentialsModel-get_or_insert">get_or_insert</a>(wiki_word,<br> |
| 413 | body='This topic is totally new!')<br> |
| 414 | assert topic.<a href="#CredentialsModel-key">key</a>().name() == 'CommonIdioms'<br> |
| 415 | assert topic.body == 'This topic is totally new!'<br> |
| 416 | <br> |
| 417 | # The second time through will just retrieve the entity.<br> |
| 418 | overwrite_topic = WikiTopic.<a href="#CredentialsModel-get_or_insert">get_or_insert</a>(wiki_word,<br> |
| 419 | body='A totally different message!')<br> |
| 420 | assert topic.<a href="#CredentialsModel-key">key</a>().name() == 'CommonIdioms'<br> |
| 421 | assert topic.body == 'This topic is totally new!'<br> |
| 422 | <br> |
| 423 | Args:<br> |
| 424 | key_name: Key name to retrieve or create.<br> |
| 425 | **kwds: Keyword arguments to pass to the constructor of the model class<br> |
| 426 | if an instance for the specified key name does not already exist. If<br> |
| 427 | an instance with the supplied key_name and parent already exists, the<br> |
| 428 | rest of these arguments will be discarded.<br> |
| 429 | <br> |
| 430 | Returns:<br> |
| 431 | Existing instance of <a href="google.appengine.ext.db.html#Model">Model</a> class with the specified key_name and parent<br> |
| 432 | or a new one that has just been created.<br> |
| 433 | <br> |
| 434 | Raises:<br> |
| 435 | TransactionFailedError if the specified <a href="google.appengine.ext.db.html#Model">Model</a> instance could not be<br> |
| 436 | retrieved or created transactionally (due to high contention, etc).</tt></dd></dl> |
| 437 | |
| 438 | <dl><dt><a name="CredentialsModel-gql"><strong>gql</strong></a>(cls, query_string, *args, **kwds)<font color="#909090"><font face="helvetica, arial"> from <a href="google.appengine.ext.db.html#PropertiedClass">google.appengine.ext.db.PropertiedClass</a></font></font></dt><dd><tt>Returns a query using GQL query string.<br> |
| 439 | <br> |
| 440 | See appengine/ext/gql for more information about GQL.<br> |
| 441 | <br> |
| 442 | Args:<br> |
| 443 | query_string: properly formatted GQL query string with the<br> |
| 444 | 'SELECT * FROM <entity>' part omitted<br> |
| 445 | *args: rest of the positional arguments used to bind numeric references<br> |
| 446 | in the query.<br> |
| 447 | **kwds: dictionary-based arguments (for named parameters).</tt></dd></dl> |
| 448 | |
| 449 | <dl><dt><a name="CredentialsModel-kind"><strong>kind</strong></a>(cls)<font color="#909090"><font face="helvetica, arial"> from <a href="google.appengine.ext.db.html#PropertiedClass">google.appengine.ext.db.PropertiedClass</a></font></font></dt><dd><tt>Returns the datastore kind we use for this model.<br> |
| 450 | <br> |
| 451 | We just use the name of the model for now, ignoring potential collisions.</tt></dd></dl> |
| 452 | |
| 453 | <dl><dt><a name="CredentialsModel-properties"><strong>properties</strong></a>(cls)<font color="#909090"><font face="helvetica, arial"> from <a href="google.appengine.ext.db.html#PropertiedClass">google.appengine.ext.db.PropertiedClass</a></font></font></dt><dd><tt>Returns a dictionary of all the properties defined for this model.</tt></dd></dl> |
| 454 | |
| 455 | <hr> |
| 456 | Static methods inherited from <a href="google.appengine.ext.db.html#Model">google.appengine.ext.db.Model</a>:<br> |
| 457 | <dl><dt><a name="CredentialsModel-__new__"><strong>__new__</strong></a>(*args, **unused_kwds)</dt><dd><tt>Allow subclasses to call <a href="#CredentialsModel-__new__">__new__</a>() with arguments.<br> |
| 458 | <br> |
| 459 | Do NOT list 'cls' as the first argument, or in the case when<br> |
| 460 | the 'unused_kwds' dictionary contains the key 'cls', the function<br> |
| 461 | will complain about multiple argument values for 'cls'.<br> |
| 462 | <br> |
| 463 | Raises:<br> |
| 464 | TypeError if there are no positional arguments.</tt></dd></dl> |
| 465 | |
| 466 | <hr> |
| 467 | Data descriptors inherited from <a href="google.appengine.ext.db.html#Model">google.appengine.ext.db.Model</a>:<br> |
| 468 | <dl><dt><strong>__dict__</strong></dt> |
| 469 | <dd><tt>dictionary for instance variables (if defined)</tt></dd> |
| 470 | </dl> |
| 471 | <dl><dt><strong>__weakref__</strong></dt> |
| 472 | <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| 473 | </dl> |
| 474 | <hr> |
| 475 | Data and other attributes inherited from <a href="google.appengine.ext.db.html#Model">google.appengine.ext.db.Model</a>:<br> |
| 476 | <dl><dt><strong>__metaclass__</strong> = <class 'google.appengine.ext.db.PropertiedClass'><dd><tt>Meta-class for initializing <a href="google.appengine.ext.db.html#Model">Model</a> classes properties.<br> |
| 477 | <br> |
| 478 | Used for initializing Properties defined in the context of a model.<br> |
| 479 | By using a meta-class much of the configuration of a <a href="google.appengine.ext.db.html#Property">Property</a><br> |
| 480 | descriptor becomes implicit. By using this meta-class, descriptors<br> |
| 481 | that are of class <a href="google.appengine.ext.db.html#Model">Model</a> are notified about which class they<br> |
| 482 | belong to and what attribute they are associated with and can<br> |
| 483 | do appropriate initialization via __property_config__.<br> |
| 484 | <br> |
| 485 | Duplicate properties are not permitted.</tt></dl> |
| 486 | |
| 487 | </td></tr></table> <p> |
| 488 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 489 | <tr bgcolor="#ffc8d8"> |
| 490 | <td colspan=3 valign=bottom> <br> |
Joe Gregorio | 6e53703 | 2011-02-09 23:04:26 -0500 | [diff] [blame] | 491 | <font color="#000000" face="helvetica, arial"><a name="CredentialsProperty">class <strong>CredentialsProperty</strong></a>(<a href="google.appengine.ext.db.html#Property">google.appengine.ext.db.Property</a>)</font></td></tr> |
| 492 | |
| 493 | <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> |
Joe Gregorio | 3b79fa8 | 2011-02-17 11:47:17 -0500 | [diff] [blame] | 494 | <td colspan=2><tt>App Engine datastore <a href="google.appengine.ext.db.html#Property">Property</a> for Credentials.<br> |
| 495 | <br> |
| 496 | Utility property that allows easy storage and retrieval of<br> |
Joe Gregorio | 6e53703 | 2011-02-09 23:04:26 -0500 | [diff] [blame] | 497 | oath2client.Credentials<br> </tt></td></tr> |
| 498 | <tr><td> </td> |
| 499 | <td width="100%"><dl><dt>Method resolution order:</dt> |
| 500 | <dd><a href="oauth2client.appengine.html#CredentialsProperty">CredentialsProperty</a></dd> |
| 501 | <dd><a href="google.appengine.ext.db.html#Property">google.appengine.ext.db.Property</a></dd> |
| 502 | <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> |
| 503 | </dl> |
| 504 | <hr> |
| 505 | Methods defined here:<br> |
| 506 | <dl><dt><a name="CredentialsProperty-empty"><strong>empty</strong></a>(self, value)</dt></dl> |
| 507 | |
| 508 | <dl><dt><a name="CredentialsProperty-get_value_for_datastore"><strong>get_value_for_datastore</strong></a>(self, model_instance)</dt><dd><tt># For writing to datastore.</tt></dd></dl> |
| 509 | |
| 510 | <dl><dt><a name="CredentialsProperty-make_value_from_datastore"><strong>make_value_from_datastore</strong></a>(self, value)</dt><dd><tt># For reading from datastore.</tt></dd></dl> |
| 511 | |
| 512 | <dl><dt><a name="CredentialsProperty-validate"><strong>validate</strong></a>(self, value)</dt></dl> |
| 513 | |
| 514 | <hr> |
| 515 | Data and other attributes defined here:<br> |
| 516 | <dl><dt><strong>data_type</strong> = <class 'oauth2client.client.Credentials'><dd><tt>Base class for all Credentials objects.<br> |
| 517 | <br> |
| 518 | Subclasses must define an authorize() method<br> |
| 519 | that applies the credentials to an HTTP transport.</tt></dl> |
| 520 | |
| 521 | <hr> |
| 522 | Methods inherited from <a href="google.appengine.ext.db.html#Property">google.appengine.ext.db.Property</a>:<br> |
| 523 | <dl><dt><a name="CredentialsProperty-__get__"><strong>__get__</strong></a>(self, model_instance, model_class)</dt><dd><tt>Returns the value for this property on the given model instance.<br> |
| 524 | <br> |
| 525 | See <a href="http://docs.python.org/ref/descriptors.html">http://docs.python.org/ref/descriptors.html</a> for a description of<br> |
| 526 | the arguments to this class and what they mean.</tt></dd></dl> |
| 527 | |
| 528 | <dl><dt><a name="CredentialsProperty-__init__"><strong>__init__</strong></a>(self, verbose_name<font color="#909090">=None</font>, name<font color="#909090">=None</font>, default<font color="#909090">=None</font>, required<font color="#909090">=False</font>, validator<font color="#909090">=None</font>, choices<font color="#909090">=None</font>, indexed<font color="#909090">=True</font>)</dt><dd><tt>Initializes this <a href="google.appengine.ext.db.html#Property">Property</a> with the given options.<br> |
| 529 | <br> |
| 530 | Args:<br> |
| 531 | verbose_name: User friendly name of property.<br> |
Joe Gregorio | 3b79fa8 | 2011-02-17 11:47:17 -0500 | [diff] [blame] | 532 | name: <a href="oauth2client.client.html#Storage">Storage</a> name for property. By default, uses attribute name<br> |
Joe Gregorio | 90e7ec2 | 2011-07-06 10:09:20 -0400 | [diff] [blame] | 533 | as it is assigned in the <a href="google.appengine.ext.db.html#Model">Model</a> sub-class.<br> |
Joe Gregorio | 6e53703 | 2011-02-09 23:04:26 -0500 | [diff] [blame] | 534 | default: Default value for property if none is assigned.<br> |
| 535 | required: Whether property is required.<br> |
| 536 | validator: User provided method used for validation.<br> |
| 537 | choices: User provided set of valid property values.<br> |
| 538 | indexed: Whether property is indexed.</tt></dd></dl> |
| 539 | |
| 540 | <dl><dt><a name="CredentialsProperty-__property_config__"><strong>__property_config__</strong></a>(self, model_class, property_name)</dt><dd><tt>Configure property, connecting it to its model.<br> |
| 541 | <br> |
| 542 | Configure the property so that it knows its property name and what class<br> |
| 543 | it belongs to.<br> |
| 544 | <br> |
| 545 | Args:<br> |
Joe Gregorio | 90e7ec2 | 2011-07-06 10:09:20 -0400 | [diff] [blame] | 546 | model_class: <a href="google.appengine.ext.db.html#Model">Model</a> class which <a href="google.appengine.ext.db.html#Property">Property</a> will belong to.<br> |
| 547 | property_name: Name of property within <a href="google.appengine.ext.db.html#Model">Model</a> instance to store property<br> |
Joe Gregorio | 6e53703 | 2011-02-09 23:04:26 -0500 | [diff] [blame] | 548 | values in. By default this will be the property name preceded by<br> |
| 549 | an underscore, but may change for different subclasses.</tt></dd></dl> |
| 550 | |
| 551 | <dl><dt><a name="CredentialsProperty-__set__"><strong>__set__</strong></a>(self, model_instance, value)</dt><dd><tt>Sets the value for this property on the given model instance.<br> |
| 552 | <br> |
| 553 | See <a href="http://docs.python.org/ref/descriptors.html">http://docs.python.org/ref/descriptors.html</a> for a description of<br> |
| 554 | the arguments to this class and what they mean.</tt></dd></dl> |
| 555 | |
| 556 | <dl><dt><a name="CredentialsProperty-datastore_type"><strong>datastore_type</strong></a>(self)</dt><dd><tt>Deprecated backwards-compatible accessor method for self.<strong>data_type</strong>.</tt></dd></dl> |
| 557 | |
| 558 | <dl><dt><a name="CredentialsProperty-default_value"><strong>default_value</strong></a>(self)</dt><dd><tt>Default value for unassigned values.<br> |
| 559 | <br> |
| 560 | Returns:<br> |
| 561 | Default value as provided by <a href="#CredentialsProperty-__init__">__init__</a>(default).</tt></dd></dl> |
| 562 | |
| 563 | <hr> |
| 564 | Data descriptors inherited from <a href="google.appengine.ext.db.html#Property">google.appengine.ext.db.Property</a>:<br> |
| 565 | <dl><dt><strong>__dict__</strong></dt> |
| 566 | <dd><tt>dictionary for instance variables (if defined)</tt></dd> |
| 567 | </dl> |
| 568 | <dl><dt><strong>__weakref__</strong></dt> |
| 569 | <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| 570 | </dl> |
| 571 | <hr> |
| 572 | Data and other attributes inherited from <a href="google.appengine.ext.db.html#Property">google.appengine.ext.db.Property</a>:<br> |
Joe Gregorio | 90e7ec2 | 2011-07-06 10:09:20 -0400 | [diff] [blame] | 573 | <dl><dt><strong>creation_counter</strong> = 1</dl> |
Joe Gregorio | 6e53703 | 2011-02-09 23:04:26 -0500 | [diff] [blame] | 574 | |
| 575 | </td></tr></table> <p> |
| 576 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 577 | <tr bgcolor="#ffc8d8"> |
| 578 | <td colspan=3 valign=bottom> <br> |
| 579 | <font color="#000000" face="helvetica, arial"><a name="FlowProperty">class <strong>FlowProperty</strong></a>(<a href="google.appengine.ext.db.html#Property">google.appengine.ext.db.Property</a>)</font></td></tr> |
| 580 | |
| 581 | <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> |
Joe Gregorio | 3b79fa8 | 2011-02-17 11:47:17 -0500 | [diff] [blame] | 582 | <td colspan=2><tt>App Engine datastore <a href="google.appengine.ext.db.html#Property">Property</a> for Flow.<br> |
| 583 | <br> |
| 584 | Utility property that allows easy storage and retreival of an<br> |
Joe Gregorio | 6e53703 | 2011-02-09 23:04:26 -0500 | [diff] [blame] | 585 | oauth2client.Flow<br> </tt></td></tr> |
| 586 | <tr><td> </td> |
| 587 | <td width="100%"><dl><dt>Method resolution order:</dt> |
| 588 | <dd><a href="oauth2client.appengine.html#FlowProperty">FlowProperty</a></dd> |
| 589 | <dd><a href="google.appengine.ext.db.html#Property">google.appengine.ext.db.Property</a></dd> |
| 590 | <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> |
| 591 | </dl> |
| 592 | <hr> |
| 593 | Methods defined here:<br> |
| 594 | <dl><dt><a name="FlowProperty-empty"><strong>empty</strong></a>(self, value)</dt></dl> |
| 595 | |
| 596 | <dl><dt><a name="FlowProperty-get_value_for_datastore"><strong>get_value_for_datastore</strong></a>(self, model_instance)</dt><dd><tt># For writing to datastore.</tt></dd></dl> |
| 597 | |
| 598 | <dl><dt><a name="FlowProperty-make_value_from_datastore"><strong>make_value_from_datastore</strong></a>(self, value)</dt><dd><tt># For reading from datastore.</tt></dd></dl> |
| 599 | |
| 600 | <dl><dt><a name="FlowProperty-validate"><strong>validate</strong></a>(self, value)</dt></dl> |
| 601 | |
| 602 | <hr> |
| 603 | Data and other attributes defined here:<br> |
| 604 | <dl><dt><strong>data_type</strong> = <class 'oauth2client.client.Flow'><dd><tt>Base class for all Flow objects.</tt></dl> |
| 605 | |
| 606 | <hr> |
| 607 | Methods inherited from <a href="google.appengine.ext.db.html#Property">google.appengine.ext.db.Property</a>:<br> |
| 608 | <dl><dt><a name="FlowProperty-__get__"><strong>__get__</strong></a>(self, model_instance, model_class)</dt><dd><tt>Returns the value for this property on the given model instance.<br> |
| 609 | <br> |
| 610 | See <a href="http://docs.python.org/ref/descriptors.html">http://docs.python.org/ref/descriptors.html</a> for a description of<br> |
| 611 | the arguments to this class and what they mean.</tt></dd></dl> |
| 612 | |
| 613 | <dl><dt><a name="FlowProperty-__init__"><strong>__init__</strong></a>(self, verbose_name<font color="#909090">=None</font>, name<font color="#909090">=None</font>, default<font color="#909090">=None</font>, required<font color="#909090">=False</font>, validator<font color="#909090">=None</font>, choices<font color="#909090">=None</font>, indexed<font color="#909090">=True</font>)</dt><dd><tt>Initializes this <a href="google.appengine.ext.db.html#Property">Property</a> with the given options.<br> |
| 614 | <br> |
| 615 | Args:<br> |
| 616 | verbose_name: User friendly name of property.<br> |
Joe Gregorio | 3b79fa8 | 2011-02-17 11:47:17 -0500 | [diff] [blame] | 617 | name: <a href="oauth2client.client.html#Storage">Storage</a> name for property. By default, uses attribute name<br> |
Joe Gregorio | 90e7ec2 | 2011-07-06 10:09:20 -0400 | [diff] [blame] | 618 | as it is assigned in the <a href="google.appengine.ext.db.html#Model">Model</a> sub-class.<br> |
Joe Gregorio | 6e53703 | 2011-02-09 23:04:26 -0500 | [diff] [blame] | 619 | default: Default value for property if none is assigned.<br> |
| 620 | required: Whether property is required.<br> |
| 621 | validator: User provided method used for validation.<br> |
| 622 | choices: User provided set of valid property values.<br> |
| 623 | indexed: Whether property is indexed.</tt></dd></dl> |
| 624 | |
| 625 | <dl><dt><a name="FlowProperty-__property_config__"><strong>__property_config__</strong></a>(self, model_class, property_name)</dt><dd><tt>Configure property, connecting it to its model.<br> |
| 626 | <br> |
| 627 | Configure the property so that it knows its property name and what class<br> |
| 628 | it belongs to.<br> |
| 629 | <br> |
| 630 | Args:<br> |
Joe Gregorio | 90e7ec2 | 2011-07-06 10:09:20 -0400 | [diff] [blame] | 631 | model_class: <a href="google.appengine.ext.db.html#Model">Model</a> class which <a href="google.appengine.ext.db.html#Property">Property</a> will belong to.<br> |
| 632 | property_name: Name of property within <a href="google.appengine.ext.db.html#Model">Model</a> instance to store property<br> |
Joe Gregorio | 6e53703 | 2011-02-09 23:04:26 -0500 | [diff] [blame] | 633 | values in. By default this will be the property name preceded by<br> |
| 634 | an underscore, but may change for different subclasses.</tt></dd></dl> |
| 635 | |
| 636 | <dl><dt><a name="FlowProperty-__set__"><strong>__set__</strong></a>(self, model_instance, value)</dt><dd><tt>Sets the value for this property on the given model instance.<br> |
| 637 | <br> |
| 638 | See <a href="http://docs.python.org/ref/descriptors.html">http://docs.python.org/ref/descriptors.html</a> for a description of<br> |
| 639 | the arguments to this class and what they mean.</tt></dd></dl> |
| 640 | |
| 641 | <dl><dt><a name="FlowProperty-datastore_type"><strong>datastore_type</strong></a>(self)</dt><dd><tt>Deprecated backwards-compatible accessor method for self.<strong>data_type</strong>.</tt></dd></dl> |
| 642 | |
| 643 | <dl><dt><a name="FlowProperty-default_value"><strong>default_value</strong></a>(self)</dt><dd><tt>Default value for unassigned values.<br> |
| 644 | <br> |
| 645 | Returns:<br> |
| 646 | Default value as provided by <a href="#FlowProperty-__init__">__init__</a>(default).</tt></dd></dl> |
| 647 | |
| 648 | <hr> |
| 649 | Data descriptors inherited from <a href="google.appengine.ext.db.html#Property">google.appengine.ext.db.Property</a>:<br> |
| 650 | <dl><dt><strong>__dict__</strong></dt> |
| 651 | <dd><tt>dictionary for instance variables (if defined)</tt></dd> |
| 652 | </dl> |
| 653 | <dl><dt><strong>__weakref__</strong></dt> |
| 654 | <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| 655 | </dl> |
| 656 | <hr> |
| 657 | Data and other attributes inherited from <a href="google.appengine.ext.db.html#Property">google.appengine.ext.db.Property</a>:<br> |
Joe Gregorio | 90e7ec2 | 2011-07-06 10:09:20 -0400 | [diff] [blame] | 658 | <dl><dt><strong>creation_counter</strong> = 1</dl> |
Joe Gregorio | 6e53703 | 2011-02-09 23:04:26 -0500 | [diff] [blame] | 659 | |
| 660 | </td></tr></table> <p> |
| 661 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 662 | <tr bgcolor="#ffc8d8"> |
| 663 | <td colspan=3 valign=bottom> <br> |
Joe Gregorio | 90e7ec2 | 2011-07-06 10:09:20 -0400 | [diff] [blame] | 664 | <font color="#000000" face="helvetica, arial"><a name="OAuth2Decorator">class <strong>OAuth2Decorator</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr> |
| 665 | |
| 666 | <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> |
| 667 | <td colspan=2><tt>Utility for making OAuth 2.0 easier.<br> |
| 668 | <br> |
| 669 | Instantiate and then use with oauth_required or oauth_aware<br> |
| 670 | as decorators on webapp.<a href="google.appengine.ext.webapp.html#RequestHandler">RequestHandler</a> methods.<br> |
| 671 | <br> |
| 672 | Example:<br> |
| 673 | <br> |
| 674 | decorator = <a href="#OAuth2Decorator">OAuth2Decorator</a>(<br> |
| 675 | client_id='837...ent.com',<br> |
| 676 | client_secret='Qh...wwI',<br> |
Joe Gregorio | 0250385 | 2011-08-31 09:07:55 -0400 | [diff] [blame] | 677 | scope='https://www.googleapis.com/auth/buzz')<br> |
Joe Gregorio | 90e7ec2 | 2011-07-06 10:09:20 -0400 | [diff] [blame] | 678 | <br> |
| 679 | <br> |
| 680 | class MainHandler(webapp.<a href="google.appengine.ext.webapp.html#RequestHandler">RequestHandler</a>):<br> |
| 681 | <br> |
| 682 | @decorator.oauth_required<br> |
| 683 | def get(self):<br> |
| 684 | http = decorator.<a href="#OAuth2Decorator-http">http</a>()<br> |
| 685 | # http is authorized with the user's Credentials and can be used<br> |
| 686 | # in API calls<br> </tt></td></tr> |
| 687 | <tr><td> </td> |
| 688 | <td width="100%">Methods defined here:<br> |
Joe Gregorio | 0250385 | 2011-08-31 09:07:55 -0400 | [diff] [blame] | 689 | <dl><dt><a name="OAuth2Decorator-__init__"><strong>__init__</strong></a>(self, client_id, client_secret, scope, auth_uri<font color="#909090">='https://accounts.google.com/o/oauth2/auth'</font>, token_uri<font color="#909090">='https://accounts.google.com/o/oauth2/token'</font>)</dt><dd><tt>Constructor for <a href="#OAuth2Decorator">OAuth2Decorator</a><br> |
Joe Gregorio | 90e7ec2 | 2011-07-06 10:09:20 -0400 | [diff] [blame] | 690 | <br> |
| 691 | Args:<br> |
| 692 | client_id: string, client identifier.<br> |
| 693 | client_secret: string client secret.<br> |
| 694 | scope: string, scope of the credentials being requested.<br> |
Joe Gregorio | 90e7ec2 | 2011-07-06 10:09:20 -0400 | [diff] [blame] | 695 | auth_uri: string, URI for authorization endpoint. For convenience<br> |
| 696 | defaults to Google's endpoints but any OAuth 2.0 provider can be used.<br> |
| 697 | token_uri: string, URI for token endpoint. For convenience<br> |
| 698 | defaults to Google's endpoints but any OAuth 2.0 provider can be used.</tt></dd></dl> |
| 699 | |
| 700 | <dl><dt><a name="OAuth2Decorator-authorize_url"><strong>authorize_url</strong></a>(self)</dt><dd><tt>Returns the URL to start the OAuth dance.<br> |
| 701 | <br> |
| 702 | Must only be called from with a webapp.<a href="google.appengine.ext.webapp.html#RequestHandler">RequestHandler</a> subclassed method<br> |
| 703 | that had been decorated with either @oauth_required or @oauth_aware.</tt></dd></dl> |
| 704 | |
| 705 | <dl><dt><a name="OAuth2Decorator-has_credentials"><strong>has_credentials</strong></a>(self)</dt><dd><tt>True if for the logged in user there are valid access Credentials.<br> |
| 706 | <br> |
| 707 | Must only be called from with a webapp.<a href="google.appengine.ext.webapp.html#RequestHandler">RequestHandler</a> subclassed method<br> |
| 708 | that had been decorated with either @oauth_required or @oauth_aware.</tt></dd></dl> |
| 709 | |
| 710 | <dl><dt><a name="OAuth2Decorator-http"><strong>http</strong></a>(self)</dt><dd><tt>Returns an authorized http instance.<br> |
| 711 | <br> |
| 712 | Must only be called from within an @oauth_required decorated method, or<br> |
| 713 | from within an @oauth_aware decorated method where <a href="#OAuth2Decorator-has_credentials">has_credentials</a>()<br> |
| 714 | returns True.</tt></dd></dl> |
| 715 | |
| 716 | <dl><dt><a name="OAuth2Decorator-oauth_aware"><strong>oauth_aware</strong></a>(self, method)</dt><dd><tt>Decorator that sets up for OAuth 2.0 dance, but doesn't do it.<br> |
| 717 | <br> |
| 718 | Does all the setup for the OAuth dance, but doesn't initiate it.<br> |
| 719 | This decorator is useful if you want to create a page that knows<br> |
| 720 | whether or not the user has granted access to this application.<br> |
| 721 | From within a method decorated with @oauth_aware the <a href="#OAuth2Decorator-has_credentials">has_credentials</a>()<br> |
| 722 | and <a href="#OAuth2Decorator-authorize_url">authorize_url</a>() methods can be called.<br> |
| 723 | <br> |
| 724 | Args:<br> |
| 725 | method: callable, to be decorated method of a webapp.<a href="google.appengine.ext.webapp.html#RequestHandler">RequestHandler</a><br> |
| 726 | instance.</tt></dd></dl> |
| 727 | |
| 728 | <dl><dt><a name="OAuth2Decorator-oauth_required"><strong>oauth_required</strong></a>(self, method)</dt><dd><tt>Decorator that starts the OAuth 2.0 dance.<br> |
| 729 | <br> |
| 730 | Starts the OAuth dance for the logged in user if they haven't already<br> |
| 731 | granted access for this application.<br> |
| 732 | <br> |
| 733 | Args:<br> |
| 734 | method: callable, to be decorated method of a webapp.<a href="google.appengine.ext.webapp.html#RequestHandler">RequestHandler</a><br> |
| 735 | instance.</tt></dd></dl> |
| 736 | |
| 737 | <hr> |
| 738 | Data descriptors defined here:<br> |
| 739 | <dl><dt><strong>__dict__</strong></dt> |
| 740 | <dd><tt>dictionary for instance variables (if defined)</tt></dd> |
| 741 | </dl> |
| 742 | <dl><dt><strong>__weakref__</strong></dt> |
| 743 | <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| 744 | </dl> |
| 745 | </td></tr></table> <p> |
| 746 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 747 | <tr bgcolor="#ffc8d8"> |
| 748 | <td colspan=3 valign=bottom> <br> |
| 749 | <font color="#000000" face="helvetica, arial"><a name="OAuth2Handler">class <strong>OAuth2Handler</strong></a>(<a href="google.appengine.ext.webapp.html#RequestHandler">google.appengine.ext.webapp.RequestHandler</a>)</font></td></tr> |
| 750 | |
| 751 | <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> |
| 752 | <td colspan=2><tt>Handler for the redirect_uri of the OAuth 2.0 dance.<br> </tt></td></tr> |
| 753 | <tr><td> </td> |
| 754 | <td width="100%"><dl><dt>Method resolution order:</dt> |
| 755 | <dd><a href="oauth2client.appengine.html#OAuth2Handler">OAuth2Handler</a></dd> |
| 756 | <dd><a href="google.appengine.ext.webapp.html#RequestHandler">google.appengine.ext.webapp.RequestHandler</a></dd> |
| 757 | <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> |
| 758 | </dl> |
| 759 | <hr> |
| 760 | Methods defined here:<br> |
| 761 | <dl><dt><a name="OAuth2Handler-get"><strong>get</strong></a> = check_login(self, *args)</dt></dl> |
| 762 | |
| 763 | <hr> |
| 764 | Methods inherited from <a href="google.appengine.ext.webapp.html#RequestHandler">google.appengine.ext.webapp.RequestHandler</a>:<br> |
| 765 | <dl><dt><a name="OAuth2Handler-delete"><strong>delete</strong></a>(self, *args)</dt><dd><tt>Handler method for DELETE requests.</tt></dd></dl> |
| 766 | |
| 767 | <dl><dt><a name="OAuth2Handler-error"><strong>error</strong></a>(self, code)</dt><dd><tt>Clears the response output stream and sets the given HTTP error code.<br> |
| 768 | <br> |
| 769 | Args:<br> |
| 770 | code: the HTTP status error code (e.g., 501)</tt></dd></dl> |
| 771 | |
| 772 | <dl><dt><a name="OAuth2Handler-handle_exception"><strong>handle_exception</strong></a>(self, exception, debug_mode)</dt><dd><tt>Called if this handler throws an exception during execution.<br> |
| 773 | <br> |
| 774 | The default behavior is to call <a href="#OAuth2Handler-error">error</a>(500) and print a stack trace<br> |
| 775 | if debug_mode is True.<br> |
| 776 | <br> |
| 777 | Args:<br> |
| 778 | exception: the exception that was thrown<br> |
| 779 | debug_mode: True if the web application is running in debug mode</tt></dd></dl> |
| 780 | |
| 781 | <dl><dt><a name="OAuth2Handler-head"><strong>head</strong></a>(self, *args)</dt><dd><tt>Handler method for HEAD requests.</tt></dd></dl> |
| 782 | |
| 783 | <dl><dt><a name="OAuth2Handler-initialize"><strong>initialize</strong></a>(self, request, response)</dt><dd><tt>Initializes this request handler with the given Request and Response.</tt></dd></dl> |
| 784 | |
| 785 | <dl><dt><a name="OAuth2Handler-options"><strong>options</strong></a>(self, *args)</dt><dd><tt>Handler method for OPTIONS requests.</tt></dd></dl> |
| 786 | |
| 787 | <dl><dt><a name="OAuth2Handler-post"><strong>post</strong></a>(self, *args)</dt><dd><tt>Handler method for POST requests.</tt></dd></dl> |
| 788 | |
| 789 | <dl><dt><a name="OAuth2Handler-put"><strong>put</strong></a>(self, *args)</dt><dd><tt>Handler method for PUT requests.</tt></dd></dl> |
| 790 | |
| 791 | <dl><dt><a name="OAuth2Handler-redirect"><strong>redirect</strong></a>(self, uri, permanent<font color="#909090">=False</font>)</dt><dd><tt>Issues an HTTP redirect to the given relative URL.<br> |
| 792 | <br> |
| 793 | Args:<br> |
| 794 | uri: a relative or absolute URI (e.g., '../flowers.html')<br> |
| 795 | permanent: if true, we use a 301 redirect instead of a 302 redirect</tt></dd></dl> |
| 796 | |
| 797 | <dl><dt><a name="OAuth2Handler-trace"><strong>trace</strong></a>(self, *args)</dt><dd><tt>Handler method for TRACE requests.</tt></dd></dl> |
| 798 | |
| 799 | <hr> |
| 800 | Class methods inherited from <a href="google.appengine.ext.webapp.html#RequestHandler">google.appengine.ext.webapp.RequestHandler</a>:<br> |
| 801 | <dl><dt><a name="OAuth2Handler-get_url"><strong>get_url</strong></a>(cls, *args, **kargs)<font color="#909090"><font face="helvetica, arial"> from <a href="__builtin__.html#type">__builtin__.type</a></font></font></dt><dd><tt>Returns the url for the given handler.<br> |
| 802 | <br> |
| 803 | The default implementation uses the patterns passed to the active<br> |
| 804 | WSGIApplication to create a url. However, it is different from Django's<br> |
| 805 | urlresolvers.reverse() in the following ways:<br> |
| 806 | - It does not try to resolve handlers via module loading<br> |
| 807 | - It does not support named arguments<br> |
| 808 | - It performs some post-prosessing on the url to remove some regex<br> |
| 809 | operators.<br> |
| 810 | - It will try to fill in the left-most missing arguments with the args<br> |
| 811 | used in the active request.<br> |
| 812 | <br> |
| 813 | Args:<br> |
| 814 | args: Parameters for the url pattern's groups.<br> |
| 815 | kwargs: Optionally contains 'implicit_args' that can either be a boolean<br> |
| 816 | or a tuple. When it is True, it will use the arguments to the<br> |
| 817 | active request as implicit arguments. When it is False (default),<br> |
| 818 | it will not use any implicit arguments. When it is a tuple, it<br> |
| 819 | will use the tuple as the implicit arguments.<br> |
| 820 | the left-most args if some are missing from args.<br> |
| 821 | <br> |
| 822 | Returns:<br> |
| 823 | The url for this handler/args combination.<br> |
| 824 | <br> |
| 825 | Raises:<br> |
| 826 | NoUrlFoundError: No url pattern for this handler has the same<br> |
| 827 | number of args that were passed in.</tt></dd></dl> |
| 828 | |
| 829 | <dl><dt><a name="OAuth2Handler-new_factory"><strong>new_factory</strong></a>(cls, *args, **kwargs)<font color="#909090"><font face="helvetica, arial"> from <a href="__builtin__.html#type">__builtin__.type</a></font></font></dt><dd><tt>Create new request handler factory.<br> |
| 830 | <br> |
| 831 | Use factory method to create reusable request handlers that just<br> |
| 832 | require a few configuration parameters to construct. Also useful<br> |
| 833 | for injecting shared state between multiple request handler<br> |
| 834 | instances without relying on global variables. For example, to<br> |
| 835 | create a set of post handlers that will do simple text transformations<br> |
| 836 | you can write:<br> |
| 837 | <br> |
| 838 | class ChangeTextHandler(webapp.<a href="google.appengine.ext.webapp.html#RequestHandler">RequestHandler</a>):<br> |
| 839 | <br> |
| 840 | def <a href="#OAuth2Handler-__init__">__init__</a>(self, transform):<br> |
| 841 | self.<strong>transform</strong> = transform<br> |
| 842 | <br> |
| 843 | def <a href="#OAuth2Handler-post">post</a>(self):<br> |
| 844 | response_text = transform(<br> |
| 845 | self.<strong>request</strong>.request.body_file.getvalue())<br> |
| 846 | self.<strong>response</strong>.out.write(response_text)<br> |
| 847 | <br> |
| 848 | application = webapp.WSGIApplication(<br> |
| 849 | [('/to_lower', ChangeTextHandler.<a href="#OAuth2Handler-new_factory">new_factory</a>(str.lower)),<br> |
| 850 | ('/to_upper', ChangeTextHandler.<a href="#OAuth2Handler-new_factory">new_factory</a>(str.upper)),<br> |
| 851 | ],<br> |
| 852 | debug=True)<br> |
| 853 | <br> |
| 854 | Text POSTed to /to_lower will be lower cased.<br> |
| 855 | Text POSTed to /to_upper will be upper cased.</tt></dd></dl> |
| 856 | |
| 857 | <hr> |
| 858 | Data descriptors inherited from <a href="google.appengine.ext.webapp.html#RequestHandler">google.appengine.ext.webapp.RequestHandler</a>:<br> |
| 859 | <dl><dt><strong>__dict__</strong></dt> |
| 860 | <dd><tt>dictionary for instance variables (if defined)</tt></dd> |
| 861 | </dl> |
| 862 | <dl><dt><strong>__weakref__</strong></dt> |
| 863 | <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| 864 | </dl> |
| 865 | </td></tr></table> <p> |
| 866 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 867 | <tr bgcolor="#ffc8d8"> |
| 868 | <td colspan=3 valign=bottom> <br> |
Joe Gregorio | 3b79fa8 | 2011-02-17 11:47:17 -0500 | [diff] [blame] | 869 | <font color="#000000" face="helvetica, arial"><a name="StorageByKeyName">class <strong>StorageByKeyName</strong></a>(<a href="oauth2client.client.html#Storage">oauth2client.client.Storage</a>)</font></td></tr> |
Joe Gregorio | 6e53703 | 2011-02-09 23:04:26 -0500 | [diff] [blame] | 870 | |
| 871 | <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> |
| 872 | <td colspan=2><tt>Store and retrieve a single credential to and from<br> |
| 873 | the App Engine datastore.<br> |
| 874 | <br> |
Joe Gregorio | 3b79fa8 | 2011-02-17 11:47:17 -0500 | [diff] [blame] | 875 | This <a href="oauth2client.client.html#Storage">Storage</a> helper presumes the Credentials<br> |
Joe Gregorio | 6e53703 | 2011-02-09 23:04:26 -0500 | [diff] [blame] | 876 | have been stored as a CredenialsProperty<br> |
| 877 | on a datastore model class, and that entities<br> |
| 878 | are stored by key_name.<br> </tt></td></tr> |
| 879 | <tr><td> </td> |
Joe Gregorio | 3b79fa8 | 2011-02-17 11:47:17 -0500 | [diff] [blame] | 880 | <td width="100%"><dl><dt>Method resolution order:</dt> |
| 881 | <dd><a href="oauth2client.appengine.html#StorageByKeyName">StorageByKeyName</a></dd> |
| 882 | <dd><a href="oauth2client.client.html#Storage">oauth2client.client.Storage</a></dd> |
| 883 | <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> |
| 884 | </dl> |
| 885 | <hr> |
| 886 | Methods defined here:<br> |
Joe Gregorio | 90e7ec2 | 2011-07-06 10:09:20 -0400 | [diff] [blame] | 887 | <dl><dt><a name="StorageByKeyName-__init__"><strong>__init__</strong></a>(self, model, key_name, property_name, cache<font color="#909090">=None</font>)</dt><dd><tt>Constructor for <a href="oauth2client.client.html#Storage">Storage</a>.<br> |
Joe Gregorio | 6e53703 | 2011-02-09 23:04:26 -0500 | [diff] [blame] | 888 | <br> |
| 889 | Args:<br> |
Joe Gregorio | 90e7ec2 | 2011-07-06 10:09:20 -0400 | [diff] [blame] | 890 | model: db.<a href="google.appengine.ext.db.html#Model">Model</a>, model class<br> |
Joe Gregorio | 6e53703 | 2011-02-09 23:04:26 -0500 | [diff] [blame] | 891 | key_name: string, key name for the entity that has the credentials<br> |
Joe Gregorio | 90e7ec2 | 2011-07-06 10:09:20 -0400 | [diff] [blame] | 892 | property_name: string, name of the property that is a <a href="#CredentialsProperty">CredentialsProperty</a><br> |
| 893 | cache: memcache, a write-through cache to put in front of the datastore</tt></dd></dl> |
Joe Gregorio | 6e53703 | 2011-02-09 23:04:26 -0500 | [diff] [blame] | 894 | |
| 895 | <dl><dt><a name="StorageByKeyName-get"><strong>get</strong></a>(self)</dt><dd><tt>Retrieve Credential from datastore.<br> |
| 896 | <br> |
| 897 | Returns:<br> |
| 898 | oauth2client.Credentials</tt></dd></dl> |
| 899 | |
| 900 | <dl><dt><a name="StorageByKeyName-put"><strong>put</strong></a>(self, credentials)</dt><dd><tt>Write a Credentials to the datastore.<br> |
| 901 | <br> |
| 902 | Args:<br> |
| 903 | credentials: Credentials, the credentials to store.</tt></dd></dl> |
| 904 | |
| 905 | <hr> |
Joe Gregorio | 3b79fa8 | 2011-02-17 11:47:17 -0500 | [diff] [blame] | 906 | Data descriptors inherited from <a href="oauth2client.client.html#Storage">oauth2client.client.Storage</a>:<br> |
Joe Gregorio | 6e53703 | 2011-02-09 23:04:26 -0500 | [diff] [blame] | 907 | <dl><dt><strong>__dict__</strong></dt> |
| 908 | <dd><tt>dictionary for instance variables (if defined)</tt></dd> |
| 909 | </dl> |
| 910 | <dl><dt><strong>__weakref__</strong></dt> |
| 911 | <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| 912 | </dl> |
| 913 | </td></tr></table></td></tr></table><p> |
| 914 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
Joe Gregorio | 90e7ec2 | 2011-07-06 10:09:20 -0400 | [diff] [blame] | 915 | <tr bgcolor="#eeaa77"> |
| 916 | <td colspan=3 valign=bottom> <br> |
| 917 | <font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr> |
| 918 | |
| 919 | <tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td> |
| 920 | <td width="100%"><dl><dt><a name="-main"><strong>main</strong></a>()</dt></dl> |
| 921 | </td></tr></table><p> |
| 922 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
Joe Gregorio | 6e53703 | 2011-02-09 23:04:26 -0500 | [diff] [blame] | 923 | <tr bgcolor="#55aa55"> |
| 924 | <td colspan=3 valign=bottom> <br> |
| 925 | <font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr> |
| 926 | |
| 927 | <tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td> |
Joe Gregorio | 90e7ec2 | 2011-07-06 10:09:20 -0400 | [diff] [blame] | 928 | <td width="100%"><strong>OAUTH2CLIENT_NAMESPACE</strong> = 'oauth2client#ns'<br> |
| 929 | <strong>__author__</strong> = 'jcgregorio@google.com (Joe Gregorio)'<br> |
| 930 | <strong>application</strong> = <google.appengine.ext.webapp.WSGIApplication object></td></tr></table><p> |
Joe Gregorio | 6e53703 | 2011-02-09 23:04:26 -0500 | [diff] [blame] | 931 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 932 | <tr bgcolor="#7799ee"> |
| 933 | <td colspan=3 valign=bottom> <br> |
| 934 | <font color="#ffffff" face="helvetica, arial"><big><strong>Author</strong></big></font></td></tr> |
| 935 | |
| 936 | <tr><td bgcolor="#7799ee"><tt> </tt></td><td> </td> |
| 937 | <td width="100%">jcgregorio@google.com (Joe Gregorio)</td></tr></table> |
| 938 | </body></html> |