Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 1 | <?xml version="1.0" encoding="ascii"?> |
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
| 3 | "DTD/xhtml1-transitional.dtd"> |
| 4 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
| 5 | <head> |
| 6 | <title>oauth2client.appengine.CredentialsProperty</title> |
| 7 | <link rel="stylesheet" href="epydoc.css" type="text/css" /> |
| 8 | <script type="text/javascript" src="epydoc.js"></script> |
| 9 | </head> |
| 10 | |
| 11 | <body bgcolor="white" text="black" link="blue" vlink="#204080" |
| 12 | alink="#204080"> |
| 13 | <!-- ==================== NAVIGATION BAR ==================== --> |
| 14 | <table class="navbar" border="0" width="100%" cellpadding="0" |
| 15 | bgcolor="#a0c0ff" cellspacing="0"> |
| 16 | <tr valign="middle"> |
| 17 | |
| 18 | <!-- Tree link --> |
| 19 | <th> <a |
| 20 | href="module-tree.html">Trees</a> </th> |
| 21 | |
| 22 | <!-- Index link --> |
| 23 | <th> <a |
| 24 | href="identifier-index.html">Indices</a> </th> |
| 25 | |
| 26 | <!-- Help link --> |
| 27 | <th> <a |
| 28 | href="help.html">Help</a> </th> |
| 29 | |
| 30 | <th class="navbar" width="100%"></th> |
| 31 | </tr> |
| 32 | </table> |
| 33 | <table width="100%" cellpadding="0" cellspacing="0"> |
| 34 | <tr valign="top"> |
| 35 | <td width="100%"> |
| 36 | <span class="breadcrumbs"> |
| 37 | <a href="oauth2client-module.html">Package oauth2client</a> :: |
| 38 | <a href="oauth2client.appengine-module.html">Module appengine</a> :: |
| 39 | Class CredentialsProperty |
| 40 | </span> |
| 41 | </td> |
| 42 | <td> |
| 43 | <table cellpadding="0" cellspacing="0"> |
| 44 | <!-- hide/show private --> |
| 45 | <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink" |
| 46 | onclick="toggle_private();">hide private</a>]</span></td></tr> |
| 47 | <tr><td align="right"><span class="options" |
| 48 | >[<a href="frames.html" target="_top">frames</a |
| 49 | >] | <a href="oauth2client.appengine.CredentialsProperty-class.html" |
| 50 | target="_top">no frames</a>]</span></td></tr> |
| 51 | </table> |
| 52 | </td> |
| 53 | </tr> |
| 54 | </table> |
| 55 | <!-- ==================== CLASS DESCRIPTION ==================== --> |
| 56 | <h1 class="epydoc">Class CredentialsProperty</h1><p class="nomargin-top"><span class="codelink"><a href="oauth2client.appengine-pysrc.html#CredentialsProperty">source code</a></span></p> |
| 57 | <center> |
Joe Gregorio | 746096f | 2012-06-15 10:53:36 -0400 | [diff] [blame] | 58 | <center> <map id="class_hierarchy_for_credential_2" name="class_hierarchy_for_credential_2"> |
| 59 | <area shape="rect" href="javascript:void(0);" title="google.appengine.ext.db.Property" alt="" coords="5,5,221,32"/> |
Joe Gregorio | f4839b0 | 2012-09-06 13:47:24 -0400 | [diff] [blame^] | 60 | <area shape="rect" href="oauth2client.appengine.CredentialsProperty-class.html" title="CredentialsProperty" alt="" coords="245,5,381,32"/> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 61 | </map> |
Joe Gregorio | 746096f | 2012-06-15 10:53:36 -0400 | [diff] [blame] | 62 | <img src="class_hierarchy_for_credential_2.gif" alt='' usemap="#class_hierarchy_for_credential_2" ismap="ismap" class="graph-without-title" /> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 63 | </center> |
| 64 | </center> |
| 65 | <hr /> |
| 66 | <pre class="literalblock"> |
| 67 | App Engine datastore Property for Credentials. |
| 68 | |
| 69 | Utility property that allows easy storage and retrieval of |
| 70 | oath2client.Credentials |
| 71 | |
| 72 | </pre> |
| 73 | |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 74 | <!-- ==================== INSTANCE METHODS ==================== --> |
| 75 | <a name="section-InstanceMethods"></a> |
| 76 | <table class="summary" border="1" cellpadding="3" |
| 77 | cellspacing="0" width="100%" bgcolor="white"> |
| 78 | <tr bgcolor="#70b0f0" class="table-header"> |
| 79 | <td colspan="2" class="table-header"> |
| 80 | <table border="0" cellpadding="0" cellspacing="0" width="100%"> |
| 81 | <tr valign="top"> |
| 82 | <td align="left"><span class="table-header">Instance Methods</span></td> |
| 83 | <td align="right" valign="top" |
| 84 | ><span class="options">[<a href="#section-InstanceMethods" |
| 85 | class="privatelink" onclick="toggle_private();" |
| 86 | >hide private</a>]</span></td> |
| 87 | </tr> |
| 88 | </table> |
| 89 | </td> |
| 90 | </tr> |
| 91 | <tr> |
| 92 | <td width="15%" align="right" valign="top" class="summary"> |
| 93 | <span class="summary-type"> </span> |
| 94 | </td><td class="summary"> |
| 95 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 96 | <tr> |
| 97 | <td><span class="summary-sig"><a href="oauth2client.appengine.CredentialsProperty-class.html#get_value_for_datastore" class="summary-sig-name">get_value_for_datastore</a>(<span class="summary-sig-arg">self</span>, |
| 98 | <span class="summary-sig-arg">model_instance</span>)</span><br /> |
| 99 | Datastore representation of this property.</td> |
| 100 | <td align="right" valign="top"> |
| 101 | <span class="codelink"><a href="oauth2client.appengine-pysrc.html#CredentialsProperty.get_value_for_datastore">source code</a></span> |
| 102 | |
| 103 | </td> |
| 104 | </tr> |
| 105 | </table> |
| 106 | |
| 107 | </td> |
| 108 | </tr> |
| 109 | <tr> |
| 110 | <td width="15%" align="right" valign="top" class="summary"> |
| 111 | <span class="summary-type"> </span> |
| 112 | </td><td class="summary"> |
| 113 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 114 | <tr> |
| 115 | <td><span class="summary-sig"><a href="oauth2client.appengine.CredentialsProperty-class.html#make_value_from_datastore" class="summary-sig-name">make_value_from_datastore</a>(<span class="summary-sig-arg">self</span>, |
| 116 | <span class="summary-sig-arg">value</span>)</span><br /> |
| 117 | Native representation of this property.</td> |
| 118 | <td align="right" valign="top"> |
| 119 | <span class="codelink"><a href="oauth2client.appengine-pysrc.html#CredentialsProperty.make_value_from_datastore">source code</a></span> |
| 120 | |
| 121 | </td> |
| 122 | </tr> |
| 123 | </table> |
| 124 | |
| 125 | </td> |
| 126 | </tr> |
| 127 | <tr> |
| 128 | <td width="15%" align="right" valign="top" class="summary"> |
| 129 | <span class="summary-type"> </span> |
| 130 | </td><td class="summary"> |
| 131 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 132 | <tr> |
| 133 | <td><span class="summary-sig"><a href="oauth2client.appengine.CredentialsProperty-class.html#validate" class="summary-sig-name">validate</a>(<span class="summary-sig-arg">self</span>, |
| 134 | <span class="summary-sig-arg">value</span>)</span><br /> |
| 135 | Assert that provided value is compatible with this property.</td> |
| 136 | <td align="right" valign="top"> |
| 137 | <span class="codelink"><a href="oauth2client.appengine-pysrc.html#CredentialsProperty.validate">source code</a></span> |
| 138 | |
| 139 | </td> |
| 140 | </tr> |
| 141 | </table> |
| 142 | |
| 143 | </td> |
| 144 | </tr> |
| 145 | <tr> |
| 146 | <td colspan="2" class="summary"> |
| 147 | <p class="indent-wrapped-lines"><b>Inherited from <code>google.appengine.ext.db.Property</code></b>: |
| 148 | <code>__get__</code>, |
| 149 | <code>__init__</code>, |
| 150 | <code>__property_config__</code>, |
| 151 | <code>__set__</code>, |
| 152 | <code>datastore_type</code>, |
| 153 | <code>default_value</code>, |
| 154 | <code>empty</code>, |
Joe Gregorio | bf14cef | 2012-06-22 15:26:16 -0400 | [diff] [blame] | 155 | <code>get_updated_value_for_datastore</code> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 156 | </p> |
| 157 | <div class="private"> <p class="indent-wrapped-lines"><b>Inherited from <code>google.appengine.ext.db.Property</code></b> (private): |
| 158 | <code>_attr_name</code>, |
| 159 | <code>_require_parameter</code> |
| 160 | </p></div> |
| 161 | <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>: |
| 162 | <code>__delattr__</code>, |
| 163 | <code>__format__</code>, |
| 164 | <code>__getattribute__</code>, |
| 165 | <code>__hash__</code>, |
| 166 | <code>__new__</code>, |
| 167 | <code>__reduce__</code>, |
| 168 | <code>__reduce_ex__</code>, |
| 169 | <code>__repr__</code>, |
| 170 | <code>__setattr__</code>, |
| 171 | <code>__sizeof__</code>, |
| 172 | <code>__str__</code>, |
| 173 | <code>__subclasshook__</code> |
| 174 | </p> |
| 175 | </td> |
| 176 | </tr> |
| 177 | </table> |
| 178 | <!-- ==================== CLASS VARIABLES ==================== --> |
| 179 | <a name="section-ClassVariables"></a> |
| 180 | <table class="summary" border="1" cellpadding="3" |
| 181 | cellspacing="0" width="100%" bgcolor="white"> |
| 182 | <tr bgcolor="#70b0f0" class="table-header"> |
| 183 | <td colspan="2" class="table-header"> |
| 184 | <table border="0" cellpadding="0" cellspacing="0" width="100%"> |
| 185 | <tr valign="top"> |
| 186 | <td align="left"><span class="table-header">Class Variables</span></td> |
| 187 | <td align="right" valign="top" |
| 188 | ><span class="options">[<a href="#section-ClassVariables" |
| 189 | class="privatelink" onclick="toggle_private();" |
| 190 | >hide private</a>]</span></td> |
| 191 | </tr> |
| 192 | </table> |
| 193 | </td> |
| 194 | </tr> |
Joe Gregorio | f4839b0 | 2012-09-06 13:47:24 -0400 | [diff] [blame^] | 195 | <tr> |
| 196 | <td width="15%" align="right" valign="top" class="summary"> |
| 197 | <span class="summary-type"> </span> |
| 198 | </td><td class="summary"> |
| 199 | <a name="data_type"></a><span class="summary-name">data_type</span> = <code title="Credentials">Credentials</code><br /> |
| 200 | str(object) -> string |
| 201 | </td> |
| 202 | </tr> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 203 | <tr> |
| 204 | <td colspan="2" class="summary"> |
| 205 | <p class="indent-wrapped-lines"><b>Inherited from <code>google.appengine.ext.db.Property</code></b>: |
| 206 | <code>creation_counter</code> |
| 207 | </p> |
| 208 | </td> |
| 209 | </tr> |
| 210 | </table> |
| 211 | <!-- ==================== PROPERTIES ==================== --> |
| 212 | <a name="section-Properties"></a> |
| 213 | <table class="summary" border="1" cellpadding="3" |
| 214 | cellspacing="0" width="100%" bgcolor="white"> |
| 215 | <tr bgcolor="#70b0f0" class="table-header"> |
| 216 | <td colspan="2" class="table-header"> |
| 217 | <table border="0" cellpadding="0" cellspacing="0" width="100%"> |
| 218 | <tr valign="top"> |
| 219 | <td align="left"><span class="table-header">Properties</span></td> |
| 220 | <td align="right" valign="top" |
| 221 | ><span class="options">[<a href="#section-Properties" |
| 222 | class="privatelink" onclick="toggle_private();" |
| 223 | >hide private</a>]</span></td> |
| 224 | </tr> |
| 225 | </table> |
| 226 | </td> |
| 227 | </tr> |
| 228 | <tr> |
| 229 | <td colspan="2" class="summary"> |
| 230 | <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>: |
| 231 | <code>__class__</code> |
| 232 | </p> |
| 233 | </td> |
| 234 | </tr> |
| 235 | </table> |
| 236 | <!-- ==================== METHOD DETAILS ==================== --> |
| 237 | <a name="section-MethodDetails"></a> |
| 238 | <table class="details" border="1" cellpadding="3" |
| 239 | cellspacing="0" width="100%" bgcolor="white"> |
| 240 | <tr bgcolor="#70b0f0" class="table-header"> |
| 241 | <td colspan="2" class="table-header"> |
| 242 | <table border="0" cellpadding="0" cellspacing="0" width="100%"> |
| 243 | <tr valign="top"> |
| 244 | <td align="left"><span class="table-header">Method Details</span></td> |
| 245 | <td align="right" valign="top" |
| 246 | ><span class="options">[<a href="#section-MethodDetails" |
| 247 | class="privatelink" onclick="toggle_private();" |
| 248 | >hide private</a>]</span></td> |
| 249 | </tr> |
| 250 | </table> |
| 251 | </td> |
| 252 | </tr> |
| 253 | </table> |
| 254 | <a name="get_value_for_datastore"></a> |
| 255 | <div> |
| 256 | <table class="details" border="1" cellpadding="3" |
| 257 | cellspacing="0" width="100%" bgcolor="white"> |
| 258 | <tr><td> |
| 259 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 260 | <tr valign="top"><td> |
| 261 | <h3 class="epydoc"><span class="sig"><span class="sig-name">get_value_for_datastore</span>(<span class="sig-arg">self</span>, |
| 262 | <span class="sig-arg">model_instance</span>)</span> |
| 263 | </h3> |
| 264 | </td><td align="right" valign="top" |
| 265 | ><span class="codelink"><a href="oauth2client.appengine-pysrc.html#CredentialsProperty.get_value_for_datastore">source code</a></span> |
| 266 | </td> |
| 267 | </tr></table> |
| 268 | |
| 269 | <pre class="literalblock"> |
| 270 | Datastore representation of this property. |
| 271 | |
| 272 | Looks for this property in the given model instance, and returns the proper |
| 273 | datastore representation of the value that can be stored in a datastore |
| 274 | entity. Most critically, it will fetch the datastore key value for |
| 275 | reference properties. |
| 276 | |
| 277 | Some properies (e.g. DateTimeProperty, UserProperty) optionally update their |
| 278 | value on every put(). This call must return the current value for such |
| 279 | properties (get_updated_value_for_datastore returns the new value). |
| 280 | |
| 281 | Args: |
| 282 | model_instance: Instance to fetch datastore value from. |
| 283 | |
| 284 | Returns: |
| 285 | Datastore representation of the model value in a form that is |
| 286 | appropriate for storing in the datastore. |
| 287 | |
| 288 | </pre> |
| 289 | <dl class="fields"> |
| 290 | <dt>Overrides: |
| 291 | google.appengine.ext.db.Property.get_value_for_datastore |
| 292 | <dd><em class="note">(inherited documentation)</em></dd> |
| 293 | </dt> |
| 294 | </dl> |
| 295 | </td></tr></table> |
| 296 | </div> |
| 297 | <a name="make_value_from_datastore"></a> |
| 298 | <div> |
| 299 | <table class="details" border="1" cellpadding="3" |
| 300 | cellspacing="0" width="100%" bgcolor="white"> |
| 301 | <tr><td> |
| 302 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 303 | <tr valign="top"><td> |
| 304 | <h3 class="epydoc"><span class="sig"><span class="sig-name">make_value_from_datastore</span>(<span class="sig-arg">self</span>, |
| 305 | <span class="sig-arg">value</span>)</span> |
| 306 | </h3> |
| 307 | </td><td align="right" valign="top" |
| 308 | ><span class="codelink"><a href="oauth2client.appengine-pysrc.html#CredentialsProperty.make_value_from_datastore">source code</a></span> |
| 309 | </td> |
| 310 | </tr></table> |
| 311 | |
| 312 | <pre class="literalblock"> |
| 313 | Native representation of this property. |
| 314 | |
| 315 | Given a value retrieved from a datastore entity, return a value, |
| 316 | possibly converted, to be stored on the model instance. Usually |
| 317 | this returns the value unchanged, but a property class may |
| 318 | override this when it uses a different datatype on the model |
| 319 | instance than on the entity. |
| 320 | |
| 321 | This API is not quite symmetric with get_value_for_datastore(), |
| 322 | because the model instance on which to store the converted value |
| 323 | may not exist yet -- we may be collecting values to be passed to a |
| 324 | model constructor. |
| 325 | |
| 326 | Args: |
| 327 | value: value retrieved from the datastore entity. |
| 328 | |
| 329 | Returns: |
| 330 | The value converted for use as a model instance attribute. |
| 331 | |
| 332 | </pre> |
| 333 | <dl class="fields"> |
| 334 | <dt>Overrides: |
| 335 | google.appengine.ext.db.Property.make_value_from_datastore |
| 336 | <dd><em class="note">(inherited documentation)</em></dd> |
| 337 | </dt> |
| 338 | </dl> |
| 339 | </td></tr></table> |
| 340 | </div> |
| 341 | <a name="validate"></a> |
| 342 | <div> |
| 343 | <table class="details" border="1" cellpadding="3" |
| 344 | cellspacing="0" width="100%" bgcolor="white"> |
| 345 | <tr><td> |
| 346 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 347 | <tr valign="top"><td> |
| 348 | <h3 class="epydoc"><span class="sig"><span class="sig-name">validate</span>(<span class="sig-arg">self</span>, |
| 349 | <span class="sig-arg">value</span>)</span> |
| 350 | </h3> |
| 351 | </td><td align="right" valign="top" |
| 352 | ><span class="codelink"><a href="oauth2client.appengine-pysrc.html#CredentialsProperty.validate">source code</a></span> |
| 353 | </td> |
| 354 | </tr></table> |
| 355 | |
| 356 | <pre class="literalblock"> |
| 357 | Assert that provided value is compatible with this property. |
| 358 | |
| 359 | Args: |
| 360 | value: Value to validate against this Property. |
| 361 | |
| 362 | Returns: |
| 363 | A valid value, either the input unchanged or adapted to the |
| 364 | required type. |
| 365 | |
| 366 | Raises: |
| 367 | BadValueError if the value is not appropriate for this |
| 368 | property in any way. |
| 369 | |
| 370 | </pre> |
| 371 | <dl class="fields"> |
| 372 | <dt>Overrides: |
| 373 | google.appengine.ext.db.Property.validate |
| 374 | <dd><em class="note">(inherited documentation)</em></dd> |
| 375 | </dt> |
| 376 | </dl> |
| 377 | </td></tr></table> |
| 378 | </div> |
| 379 | <br /> |
| 380 | <!-- ==================== NAVIGATION BAR ==================== --> |
| 381 | <table class="navbar" border="0" width="100%" cellpadding="0" |
| 382 | bgcolor="#a0c0ff" cellspacing="0"> |
| 383 | <tr valign="middle"> |
| 384 | |
| 385 | <!-- Tree link --> |
| 386 | <th> <a |
| 387 | href="module-tree.html">Trees</a> </th> |
| 388 | |
| 389 | <!-- Index link --> |
| 390 | <th> <a |
| 391 | href="identifier-index.html">Indices</a> </th> |
| 392 | |
| 393 | <!-- Help link --> |
| 394 | <th> <a |
| 395 | href="help.html">Help</a> </th> |
| 396 | |
| 397 | <th class="navbar" width="100%"></th> |
| 398 | </tr> |
| 399 | </table> |
| 400 | <table border="0" cellpadding="0" cellspacing="0" width="100%%"> |
| 401 | <tr> |
| 402 | <td align="left" class="footer"> |
Joe Gregorio | f4839b0 | 2012-09-06 13:47:24 -0400 | [diff] [blame^] | 403 | Generated by Epydoc 3.0.1 on Thu Sep 6 13:36:13 2012 |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 404 | </td> |
| 405 | <td align="right" class="footer"> |
| 406 | <a target="mainFrame" href="http://epydoc.sourceforge.net" |
| 407 | >http://epydoc.sourceforge.net</a> |
| 408 | </td> |
| 409 | </tr> |
| 410 | </table> |
| 411 | |
| 412 | <script type="text/javascript"> |
| 413 | <!-- |
| 414 | // Private objects are initially displayed (because if |
| 415 | // javascript is turned off then we want them to be |
| 416 | // visible); but by default, we want to hide them. So hide |
| 417 | // them unless we have a cookie that says to show them. |
| 418 | checkCookie(); |
| 419 | // --> |
| 420 | </script> |
| 421 | </body> |
| 422 | </html> |