boxsdk package

Subpackages

Submodules

boxsdk.config module

class boxsdk.config.API[source]

Bases: object

Configuration object containing the URLs for the Box API.

BASE_API_URL = u'https://api.box.com/2.0'
OAUTH2_API_URL = u'https://api.box.com/oauth2'
OAUTH2_AUTHORIZE_URL = u'https://account.box.com/api/oauth2/authorize'
UPLOAD_URL = u'https://upload.box.com/api/2.0'
class boxsdk.config.Client[source]

Bases: object

Configuration object containing the user agent string.

BOX_UA_STRING = u'agent=box-python-sdk/2.0.0; env=python/2.7.12'
USER_AGENT_STRING = u'box-python-sdk-2.0.0'
VERSION = u'2.0.0'

boxsdk.exception module

exception boxsdk.exception.BoxException[source]

Bases: exceptions.Exception

Base class exception for all errors raised from the SDK.

exception boxsdk.exception.BoxAPIException(status, code=None, message=None, request_id=None, headers=None, url=None, method=None, context_info=None, network_response=None)[source]

Bases: boxsdk.exception.BoxException

Exception raised from the box session layer.

Parameters:
  • status (int) – HTTP status code of the failed response
  • code (unicode or None) – The ‘code’ field of the failed response
  • message (unicode or None) – A message to associate with the exception, e.g. ‘message’ field of the json in the failed response
  • request_id (unicode or None) – The ‘request_id’ field of the json in the failed response
  • headers (dict) – The HTTP headers in the failed response
  • url (unicode) – The url which raised the exception
  • method (unicode) – The HTTP verb used to make the request.
  • context_info (dict or None) – The context_info returned in the failed response.
  • network_response (Requests Response) – The failed response
code
context_info
headers
message
method
network_response
request_id
status
url
exception boxsdk.exception.BoxOAuthException(status, message=None, url=None, method=None, network_response=None, code=None)[source]

Bases: boxsdk.exception.BoxException

Exception raised during auth.

Parameters:
  • status (int) – HTTP status code of the auth response
  • message (unicode) – A message to associate with the exception, e.g. HTTP content of the auth response
  • url (unicode) – The url which raised the exception
  • method (unicode) – The HTTP verb used to make the request.
  • network_response (NetworkResponse) – The network response for the request.
  • code (unicode or None) – The ‘code’ field of the failed response
code
message
method
network_response
status
url
exception boxsdk.exception.BoxNetworkException[source]

Bases: boxsdk.exception.BoxException

Exception raised from the network layer.

boxsdk.version module

Module contents