Module multistore_file
source code
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.
}
}
]
}
Author:
jbeda@google.com (Joe Beda)
|
|
logger = logging.getLogger(__name__)
|
|
|
_multistores = {}
|
|
|
_multistores_lock = threading.Lock()
|
|
|
__package__ = 'oauth2client'
|