benchling_api_client.benchling_client module

class AuthorizationMethod

Bases: abc.ABC

An abstract class that defines how the Benchling Client will authorize with the server.

abstract get_authorization_header(base_url: str) str

Return a string that will be passed to the HTTP Authorization request header.

The returned string is expected to contain both the scheme (e.g. Basic, Bearer) and parameters.

class BenchlingApiClient

Bases: benchling_api_client.client.Client

__init__(base_url: str, auth_method: AuthorizationMethod, *, cookies: Dict[str, str] = NOTHING, headers: Dict[str, str] = NOTHING, timeout: float = attr_dict['timeout'].default) None

Method generated by attrs for class BenchlingApiClient.

auth_method: AuthorizationMethod
get_headers() Dict[str, str]

Get headers to be used in authenticated endpoints.