ApiKeyCredentials Class

Represent the ApiKey feature of Swagger.

Dict should be dict[str,str] to be accepted by requests.

Inheritance
ApiKeyCredentials

Constructor

ApiKeyCredentials(in_headers: Optional[Dict[str, str]] = None, in_query: Optional[Dict[str, str]] = None)

Parameters

in_headers
dict[<xref:str,str>]
default value: None

Headers part of the ApiKey

in_query
dict[<xref:str,str>]
default value: None

ApiKey in the query as parameters

Methods

signed_session

Create requests session with ApiKey.

If a session object is provided, configure it directly. Otherwise, create a new session and return it.

signed_session

Create requests session with ApiKey.

If a session object is provided, configure it directly. Otherwise, create a new session and return it.

signed_session(session: Optional[requests.sessions.Session] = None) -> requests.sessions.Session

Parameters

session
<xref:requests.Session>
default value: None

The session to configure for authentication

Return type

<xref:requests.Session>