Package oauth2client :: Module client :: Class Storage |
[hide private]
[frames] | no frames]

# Class Storage

source code

    Base class for all Storage objects.

    Store and retrieve a single credential. This class supports locking
    such that multiple processes and threads can operate on a single
    store.

Instance Methods | [hide private]
acquire_lock(self) Acquires any lock necessary to access this Storage. | source code
release_lock(self) Release the Storage lock. | source code
locked_get(self) Retrieve credential. | source code
locked_put(self, credentials) Write a credential. | source code
locked_delete(self) Delete a credential. | source code
get(self) Retrieve credential. | source code
put(self, credentials) Write a credential. | source code
delete(self) Delete credential. | source code
Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__init__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Properties | [hide private]
Inherited from `object`: `__class__`

Method Details | [hide private]

### acquire_lock(self) | source code
    Acquires any lock necessary to access this Storage.

    This lock is not reentrant.

### release_lock(self) | source code
    Release the Storage lock.

    Trying to release a lock that isn't held will result in a
    RuntimeError.

### locked_get(self) | source code
    Retrieve credential.

    The Storage lock must be held when this is called.

    Returns:
      oauth2client.client.Credentials

### locked_put(self, credentials) | source code
    Write a credential.

    The Storage lock must be held when this is called.

    Args:
      credentials: Credentials, the credentials to store.

### locked_delete(self) | source code
    Delete a credential.

    The Storage lock must be held when this is called.

### get(self) | source code
    Retrieve credential.

    The Storage lock must *not* be held when this is called.

    Returns:
      oauth2client.client.Credentials

### put(self, credentials) | source code
    Write a credential.

    The Storage lock must be held when this is called.

    Args:
      credentials: Credentials, the credentials to store.

### delete(self) | source code
    Delete credential.

    Frees any resources associated with storing the credential.
    The Storage lock must *not* be held when this is called.

    Returns:
      None