This is the base class for service objects. Service objects are used to do
all requests to Storage. This class cannot be instantiated directly.
The storage account name. This is used to authenticate requests
signed with an account key and to construct the storage endpoint. It
is required unless a connection string is given, or if a custom
domain is used with anonymous authentication.
The storage account key. This is used for shared key authentication.
If neither account key or sas token is specified, anonymous access
will be used.
A shared access signature token to use to authenticate requests
instead of the account key. If account key and sas token are both
specified, account key will be used to sign. If neither are
specified, anonymous access will be used.
The endpoint to send storage requests to.
The secondary endpoint to read storage data from. This will only be a
valid endpoint if the storage account used is RA-GRS and thus allows
reading from secondary.
A function which determines whether to retry. Takes as a parameter a
object. Returns the number
of seconds to wait before retrying the request, or None to indicate not
The host location to use to make requests. Defaults to LocationMode.PRIMARY.
Note that this setting only applies to RA-GRS accounts as other account
types do not allow reading from secondary. If the location_mode is set to
LocationMode.SECONDARY, read requests will be sent to the secondary endpoint.
Write requests will continue to be sent to primary.
The protocol to use for requests. Defaults to https.
The session object to use for http requests.
A function called immediately before each request is sent. This function
takes as a parameter the request object and returns nothing. It may be
used to added custom headers or log request data.
A function called immediately after each response is received. This
function takes as a parameter the response object and returns nothing.
It may be used to log response data.
A function called immediately after retry evaluation is performed. This
function takes as a parameter the retry context object and returns nothing.
It may be used to detect retries and log context information.