benchling_api_client.client module¶
- class AuthenticatedClient¶
Bases:
benchling_api_client.client.Client
A Client which has been authenticated for use on secured endpoints
- class Client¶
Bases:
object
A class for keeping track of data related to the API
- __init__(base_url: str, *, cookies: Dict[str, str] = NOTHING, headers: Dict[str, str] = NOTHING, timeout: float = attr_dict['timeout'].default) None ¶
Method generated by attrs for class Client.
- with_cookies(cookies: Dict[str, str]) Client ¶
Get a new client matching this one with additional cookies
- with_headers(headers: Dict[str, str]) Client ¶
Get a new client matching this one with additional headers
- with_timeout(timeout: float, increase_only: bool = True) Client ¶
Get a new client matching this one with a new timeout (in seconds).
- Parameters
timeout – The new client timeout in seconds
increase_only – If True, will only use the specified timeout if it’s
higher than the existing Client timeout :return: A new Client with the adjusted timeout :rtype: Client