hellosign_sdk.utils.exception.
BadGateway
(message, http_code=None)¶Bases: hellosign_sdk.utils.exception.HTTPError
Bad gateway
hellosign_sdk.utils.exception.
BadRequest
(message, http_code=None)¶Bases: hellosign_sdk.utils.exception.HTTPError
Bad request data
hellosign_sdk.utils.exception.
Conflict
(message, http_code=None)¶Bases: hellosign_sdk.utils.exception.HTTPError
Request correctly formulated but unable to proceed due to a conflict
hellosign_sdk.utils.exception.
Forbidden
(message, http_code=None)¶Bases: hellosign_sdk.utils.exception.HTTPError
Not authorized to proceed
hellosign_sdk.utils.exception.
GatewayTimeout
(message, http_code=None)¶Bases: hellosign_sdk.utils.exception.HTTPError
Gateway timeout
hellosign_sdk.utils.exception.
Gone
(message, http_code=None)¶Bases: hellosign_sdk.utils.exception.HTTPError
Resource deleted
hellosign_sdk.utils.exception.
HSException
(message)¶Bases: exceptions.Exception
General HelloSign exception
We use this object to raise exceptions when none of its child classes is suitable for use.
hellosign_sdk.utils.exception.
HTTPError
(message, http_code=None)¶Bases: hellosign_sdk.utils.exception.HSException
General HTTP error
hellosign_sdk.utils.exception.
InternalServerError
(message, http_code=None)¶Bases: hellosign_sdk.utils.exception.HTTPError
Server error
hellosign_sdk.utils.exception.
MethodNotAllowed
(message, http_code=None)¶Bases: hellosign_sdk.utils.exception.HTTPError
HTTP method not supported
hellosign_sdk.utils.exception.
MethodNotImplemented
(message, http_code=None)¶Bases: hellosign_sdk.utils.exception.HTTPError
Not implemented
hellosign_sdk.utils.exception.
NoAuthMethod
(message)¶Bases: hellosign_sdk.utils.exception.HSException
No authentication data
hellosign_sdk.utils.exception.
NotAcceptable
(message, http_code=None)¶Bases: hellosign_sdk.utils.exception.HTTPError
Accept header conflicts with the returned resource type
hellosign_sdk.utils.exception.
NotFound
(message, http_code=None)¶Bases: hellosign_sdk.utils.exception.HTTPError
Resource not found
hellosign_sdk.utils.exception.
PaymentRequired
(message, http_code=None)¶Bases: hellosign_sdk.utils.exception.HTTPError
Payment/upgrade required to proceed
hellosign_sdk.utils.exception.
RequestTimeout
(message, http_code=None)¶Bases: hellosign_sdk.utils.exception.HTTPError
Request timeout
hellosign_sdk.utils.exception.
RequestURITooLong
(message, http_code=None)¶Bases: hellosign_sdk.utils.exception.HTTPError
Request URI too long
hellosign_sdk.utils.exception.
RequestedRangeNotSatisfiable
(message, http_code=None)¶Bases: hellosign_sdk.utils.exception.HTTPError
Invalid resource data chunk requested
Bases: hellosign_sdk.utils.exception.HTTPError
Service unavailable
Bases: hellosign_sdk.utils.exception.HTTPError
Bad authentication data
hellosign_sdk.utils.exception.
UnsupportedMediaType
(message, http_code=None)¶Bases: hellosign_sdk.utils.exception.HTTPError
Unsupported media type
hellosign_sdk.utils.hsaccesstokenauth.
HSAccessTokenAuth
(access_token, access_token_type, refresh_token=None, expires_in=None, state=None)¶Bases: requests.auth.AuthBase
Authentication object using HelloSign’s access token
from_response
(response_data)¶Builds a new HSAccessTokenAuth straight from response data
hellosign_sdk.utils.request.
HSRequest
(auth, env='production')¶Bases: object
Object to handle HTTP requests
Although we have greate requests package which can handle the HTTP request beautifully, we need this class to fit better our need like sending the requests with authentication information, download files, check HTTP errors...
DEFAULT_ENCODING
= 'UTF-8'¶USER_AGENT
= 'hellosign-python-sdk'¶get
(url, headers=None, parameters=None, get_json=True)¶Send a GET request with custome headers and parameters
get_file
(url, path_or_file=None, headers=None, filename=None)¶Get a file from a url and save it as filename
url (str): URL to send the request to
path_or_file (str or file): A writable File-like object or a path to save the file to.
headers (str, optional): custom headers
get_warnings
()¶Return the list of warnings associated with this request, or None if there aren’t any
headers
= None¶http_status_code
= 0¶parameters
= None¶post
(url, data=None, files=None, headers=None, get_json=True)¶Make POST request to a url
response_callback
= None¶verify_ssl
= True¶warnings
= None¶hellosign_sdk.utils.
api_resource
(obj_cls)¶Decorator that transforms response data into a Resource
hellosign_sdk.utils.
api_resource_list
(obj_cls)¶Bases: hellosign_sdk.utils.api_resource
Decorator that transforms response data into a ResourceList