api_client module
ApiClient
Parameters
configuration=None
header_name=None
header_value=None
cookie=None
pool_threads=1
Class variables
NATIVE_TYPES_MAPPING
PRIMITIVE_TYPES
Instance variables
pool
Create thread pool on first request avoids instantiating unused threadpool for blocking clients.user_agent
User agent for this API client
Static methods
get_default
Return new instance of ApiClient.
This method returns newly created, based on default constructor, object of ApiClient class or returns a copy of default ApiClient.
set_default
Set default instance of ApiClient.
It stores default ApiClient.
Parameters
default
Methods
call_api
Makes the HTTP request (synchronous) and returns deserialized data.
To make an async_req request, set the async_req parameter.
Parameters
self
resource_path
method
path_params=None
query_params=None
header_params=None
body=None
post_params=None
files=None
response_types_map=None
auth_settings=None
async_req=None
collection_formats=None
close
Parameters
self
deserialize
Deserializes response into an object.
Parameters
self
response
response_type
files_parameters
Builds form parameters.
Parameters
self
files=None
parameters_to_tuples
Get parameters as list of tuples, formatting collections.
Parameters
self
params
collection_formats
parameters_to_url_query
Get parameters as list of tuples, formatting collections.
Parameters
self
params
collection_formats
request
Makes the HTTP request using RESTClient.
Parameters
self
method
url
query_params=None
headers=None
post_params=None
body=None
sanitize_for_serialization
Builds a JSON POST object.
If obj is None, return None. If obj is str, int, long, float, bool, return directly. If obj is datetime.datetime, datetime.date convert to string in iso8601 format. If obj is list, sanitize each element in the list. If obj is dict, return the dict. If obj is OpenAPI model, return the properties dict.
Parameters
self
obj
select_header_accept
Returns Accept
based on an array of accepts provided.
Parameters
self
accepts
select_header_content_type
Returns Content-Type
based on an array of content_types provided.
Parameters
self
content_types
set_default_header
Parameters
self
header_name
header_value
update_params_for_auth
Updates header and query params based on authentication setting.
Parameters
self
headers
queries
auth_settings
resource_path
method
body
request_auth=None
Last updated