cdp.auth.clients.urllib3 package¶
Submodules¶
cdp.auth.clients.urllib3.client module¶
- class cdp.auth.clients.urllib3.client.Urllib3AuthClient(options, base_url, debug=False)¶
Bases:
object
HTTP client that automatically adds authentication headers.
- request(method, url, headers=None, body=None, **kwargs)¶
Make an authenticated HTTP request.
- Parameters:
method (
str
) – The HTTP methodurl (
str
) – The URL to request (relative or absolute)headers (
Optional
[dict
[str
,str
]]) – Optional additional headersbody (
Union
[dict
[str
,Any
],bytes
,None
]) – Optional request body (can be a dict for JSON or bytes)**kwargs (
Any
) – Additional arguments passed to urllib3.request()
- Return type:
HTTPResponse
- Returns:
urllib3.HTTPResponse
- class cdp.auth.clients.urllib3.client.Urllib3AuthClientOptions(**data)¶
Bases:
BaseModel
Configuration options for the authenticated HTTP client.
- api_key_id - The API key ID
Examples
‘xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx’ ‘organizations/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/apiKeys/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx’
- api_key_secret - The API key secret
Examples
‘xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx==’ (Edwards key (Ed25519)) ‘—–BEGIN EC PRIVATE KEY—–n…n…n…==n—–END EC PRIVATE KEY—–n’ (EC key (ES256))
- [wallet_secret] - Optional wallet secret for authenticating with endpoints that require wallet authentication.
- [source] - Optional source of the request
- [source_version] - Optional version of the source of the request
- [expires_in] - Optional expiration time in seconds
- Type:
defaults to 120
-
api_key_id:
str
¶
-
api_key_secret:
str
¶
-
expires_in:
int
|None
¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
source:
str
|None
¶
-
source_version:
str
|None
¶
-
wallet_secret:
str
|None
¶
Module contents¶
Request hooks for different HTTP clients.
- class cdp.auth.clients.urllib3.Urllib3AuthClient(options, base_url, debug=False)¶
Bases:
object
HTTP client that automatically adds authentication headers.
- request(method, url, headers=None, body=None, **kwargs)¶
Make an authenticated HTTP request.
- Parameters:
method (
str
) – The HTTP methodurl (
str
) – The URL to request (relative or absolute)headers (
Optional
[dict
[str
,str
]]) – Optional additional headersbody (
Union
[dict
[str
,Any
],bytes
,None
]) – Optional request body (can be a dict for JSON or bytes)**kwargs (
Any
) – Additional arguments passed to urllib3.request()
- Return type:
HTTPResponse
- Returns:
urllib3.HTTPResponse
- class cdp.auth.clients.urllib3.Urllib3AuthClientOptions(**data)¶
Bases:
BaseModel
Configuration options for the authenticated HTTP client.
- api_key_id - The API key ID
Examples
‘xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx’ ‘organizations/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/apiKeys/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx’
- api_key_secret - The API key secret
Examples
‘xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx==’ (Edwards key (Ed25519)) ‘—–BEGIN EC PRIVATE KEY—–n…n…n…==n—–END EC PRIVATE KEY—–n’ (EC key (ES256))
- [wallet_secret] - Optional wallet secret for authenticating with endpoints that require wallet authentication.
- [source] - Optional source of the request
- [source_version] - Optional version of the source of the request
- [expires_in] - Optional expiration time in seconds
- Type:
defaults to 120
-
api_key_id:
str
¶
-
api_key_secret:
str
¶
-
expires_in:
int
|None
¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
source:
str
|None
¶
-
source_version:
str
|None
¶
-
wallet_secret:
str
|None
¶