This module provides the class representing the requests to throttle.
Exception that occurs when a finished is tried to change some attributes to a finished throttled request
Parameters: | msg (string) – the message |
---|
This class represents a throttled request
Parameters: |
|
---|
Create a throttled request with the given prepared request
Parameters: | request (requests.PreparedRequest) – the prepared request to throttle |
---|
The flag that indicates if the request has been processed
Getter: | Returns finished |
---|---|
Type: | boolean |
The response obtained by processing the request
Getter: | Returns response |
||||
---|---|---|---|---|---|
Setter: | Sets the response received after the processing of the request |
||||
Raise: |
|
||||
Type: | requests.Response |
Return the exception that occurs by processing the request (blocking)
Getter: | Returns exception |
||||
---|---|---|---|---|---|
Setter: | Sets the exception raised during the processing of the request |
||||
Raise: |
|
||||
Type: | Exception |
Return the response obtained by processing the request
If timeout is None it waits until a response has been obtained or an execption occurs. When a response has been obtained it is returned, if an exception occurs it is raised. If timeout is not None and no response still hasn’t been obtained after the expiration of timeout, then None is returned.
Parameters: | timeout (float) – the timeout value in seconds (default: 0) |
---|---|
Returns: | response or None |
Return type: | requests.Response |
Return the exception that occurs by processing the request
If timeout is None it waits until a response has been obtained or an execption occurs. If an exception occurs it is returned otherwise None is returned. If timeout is not None and no response still hasn’t been obtained None is returned.
Parameters: | timeout (float) – the timeout value in seconds (default: 0) |
---|---|
Returns: | exception or None |
Return type: | Exception |