azure.batch package

class azure.batch.BatchServiceClient(credentials, batch_url)[source]

A client for issuing REST requests to the Azure Batch service.

Variables
Parameters
  • credentials (A msrestazure Credentials object) – Credentials needed for the client to connect to Azure.

  • batch_url (str) – The base URL for all Azure Batch service requests.

close()

Close the client if keep_alive is True.

class azure.batch.BatchServiceClientConfiguration(credentials, batch_url)[source]

Configuration for BatchServiceClient Note that all parameters used to create this instance are saved as instance attributes.

Parameters
  • credentials (A msrestazure Credentials object) – Credentials needed for the client to connect to Azure.

  • batch_url (str) – The base URL for all Azure Batch service requests.

add_user_agent(value)

Add value to current user agent with a space.

Parameters

value (str) – value to add to user agent.

load(filepath)

Load configuration from existing file.

Parameters

filepath (str) – Path to existing config file.

Raises

ValueError if supplied config file is invalid.

save(filepath)

Save current configuration to file.

Parameters

filepath (str) – Path to save file to.

Raises

ValueError if supplied filepath cannot be written to.

property enable_http_logger
property user_agent

The current user agent value.

Submodules

azure.batch.batch_auth module

class azure.batch.batch_auth.SharedKeyAuth(header, account_name, key)[source]
headers_to_sign = ['content-encoding', 'content-language', 'content-length', 'content-md5', 'content-type', 'date', 'if-modified-since', 'if-match', 'if-none-match', 'if-unmodified-since', 'range']
class azure.batch.batch_auth.SharedKeyCredentials(account_name, key)[source]
signed_session(session=None)[source]

Create requests session with any required auth headers applied.

If a session object is provided, configure it directly. Otherwise, create a new session and return it.

Parameters

session (requests.Session) – The session to configure for authentication

Return type

requests.Session

header = 'Authorization'