oauth2client.multistore_file
index
/usr/local/google/home/jcgregorio/projects/apiclient-release/oauth2client/multistore_file.py

Multi-credential file store with lock support.
 
This module implements a JSON credential store where multiple
credentials can be stored in one file.  That file supports locking
both in a single process and across processes.
 
The credential themselves are keyed off of:
* client_id
* user_agent
* scope
 
The format of the stored data is like so:
{
  'file_version': 1,
  'data': [
    {
      'key': {
        'clientId': '<client id>',
        'userAgent': '<user agent>',
        'scope': '<scope>'
      },
      'credential': {
        # JSON serialized Credentials.
      }
    }
  ]
}

 
Modules
       
base64
errno
fcntl
logging
os
json
threading

 
Classes
       
exceptions.Exception(exceptions.BaseException)
Error
NewerCredentialStoreError

 
class Error(exceptions.Exception)
    Base error for this module.
 
 
Method resolution order:
Error
exceptions.Exception
exceptions.BaseException
__builtin__.object

Data descriptors defined here:
__weakref__
list of weak references to the object (if defined)

Methods inherited from exceptions.Exception:
__init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Data and other attributes inherited from exceptions.Exception:
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T

Methods inherited from exceptions.BaseException:
__delattr__(...)
x.__delattr__('name') <==> del x.name
__getattribute__(...)
x.__getattribute__('name') <==> x.name
__getitem__(...)
x.__getitem__(y) <==> x[y]
__getslice__(...)
x.__getslice__(i, j) <==> x[i:j]
 
Use of negative indices is not supported.
__reduce__(...)
__repr__(...)
x.__repr__() <==> repr(x)
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value
__setstate__(...)
__str__(...)
x.__str__() <==> str(x)
__unicode__(...)

Data descriptors inherited from exceptions.BaseException:
__dict__
args
message

 
class NewerCredentialStoreError(Error)
    The credential store is a newer version that supported.
 
 
Method resolution order:
NewerCredentialStoreError
Error
exceptions.Exception
exceptions.BaseException
__builtin__.object

Data descriptors inherited from Error:
__weakref__
list of weak references to the object (if defined)

Methods inherited from exceptions.Exception:
__init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Data and other attributes inherited from exceptions.Exception:
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T

Methods inherited from exceptions.BaseException:
__delattr__(...)
x.__delattr__('name') <==> del x.name
__getattribute__(...)
x.__getattribute__('name') <==> x.name
__getitem__(...)
x.__getitem__(y) <==> x[y]
__getslice__(...)
x.__getslice__(i, j) <==> x[i:j]
 
Use of negative indices is not supported.
__reduce__(...)
__repr__(...)
x.__repr__() <==> repr(x)
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value
__setstate__(...)
__str__(...)
x.__str__() <==> str(x)
__unicode__(...)

Data descriptors inherited from exceptions.BaseException:
__dict__
args
message

 
Functions
       
get_credential_storage(filename, client_id, user_agent, scope, warn_on_readonly=True)
Get a Storage instance for a credential.
 
Args:
  filename: The JSON file storing a set of credentials
  client_id: The client_id for the credential
  user_agent: The user agent for the credential
  scope: string or list of strings, Scope(s) being requested
  warn_on_readonly: if True, log a warning if the store is readonly
 
Returns:
  An object derived from client.Storage for getting/setting the
  credential.

 
Data
        __author__ = 'jbeda@google.com (Joe Beda)'
logger = <logging.Logger instance>

 
Author
        jbeda@google.com (Joe Beda)