configuration
😸 Cheshire-Cat API
Production ready AI assistant framework
The version of the OpenAPI document: 1.3.1 Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
Configuration
This class contains various settings of the API client.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
host
|
Base url. |
None
|
|
api_key
|
Dict to store API key(s). Each entry in the dict specifies an API key. The dict key is the name of the security scheme in the OAS specification. The dict value is the API key secret. |
None
|
|
api_key_prefix
|
Dict to store API prefix (e.g. Bearer). The dict key is the name of the security scheme in the OAS specification. The dict value is an API key prefix when generating the auth data. |
None
|
|
username
|
Username for HTTP basic authentication. |
None
|
|
password
|
Password for HTTP basic authentication. |
None
|
|
access_token
|
Access token. |
None
|
|
server_index
|
Index to servers configuration. |
None
|
|
server_variables
|
Mapping with string values to replace variables in templated server configuration. The validation of enums is performed for variables with defined enum values before. |
None
|
|
server_operation_index
|
Mapping from operation ID to an index to server configuration. |
None
|
|
server_operation_variables
|
Mapping from operation ID to a mapping with string values to replace variables in templated server configuration. The validation of enums is performed for variables with defined enum values before. |
None
|
|
ssl_ca_cert
|
str - the path to a file of concatenated CA certificates in PEM format. |
None
|
Source code in cheshire_cat_api/configuration.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 |
|
access_token = access_token
instance-attribute
Access token
assert_hostname = None
instance-attribute
Set this to True/False to enable/disable SSL hostname verification.
cert_file = None
instance-attribute
client certificate file
date_format = '%Y-%m-%d'
instance-attribute
date format
datetime_format = '%Y-%m-%dT%H:%M:%S.%f%z'
instance-attribute
datetime format
debug
property
writable
Debug status
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value
|
The debug status, True or False. |
required |
host
property
writable
Return generated host.
key_file = None
instance-attribute
client key file
logger = {}
instance-attribute
Logging Settings
logger_file
property
writable
The logger file.
If the logger_file is None, then add stream handler and remove file handler. Otherwise, add file handler and remove stream handler.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value
|
The logger_file path. |
required |
logger_file_handler = None
instance-attribute
Log file handler
logger_format
property
writable
The logger format.
The logger_formatter will be updated when sets logger_format.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value
|
The format string. |
required |
logger_stream_handler = None
instance-attribute
Log stream handler
password = password
instance-attribute
Password for HTTP basic authentication
proxy = None
instance-attribute
Proxy URL
proxy_headers = None
instance-attribute
Proxy headers
refresh_api_key_hook = None
instance-attribute
function hook to refresh API key if expired
retries = None
instance-attribute
Adding retries to override urllib3 default value 3
safe_chars_for_path_param = ''
instance-attribute
Safe chars for path_param
server_operation_index = server_operation_index or {}
instance-attribute
Default server index
server_operation_variables = server_operation_variables or {}
instance-attribute
Default server variables
socket_options = None
instance-attribute
Options to pass down to the underlying urllib3 socket
ssl_ca_cert = ssl_ca_cert
instance-attribute
Set this to customize the certificate file to verify the peer.
temp_folder_path = None
instance-attribute
Temp file folder for downloading files
tls_server_name = None
instance-attribute
SSL/TLS Server Name Indication (SNI) Set this to the SNI value expected by the server.
username = username
instance-attribute
Username for HTTP basic authentication
verify_ssl = True
instance-attribute
SSL/TLS verification Set this to false to skip verifying SSL certificate when calling API from https server.
__init__(host=None, api_key=None, api_key_prefix=None, username=None, password=None, access_token=None, server_index=None, server_variables=None, server_operation_index=None, server_operation_variables=None, ssl_ca_cert=None)
Constructor
Source code in cheshire_cat_api/configuration.py
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 |
|
auth_settings()
Gets Auth Settings dict for api client.
Returns:
Type | Description |
---|---|
The Auth Settings information dict. |
get_api_key_with_prefix(identifier, alias=None)
Gets API key (with prefix if set).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
identifier
|
The identifier of apiKey. |
required | |
alias
|
The alternative identifier of apiKey. |
None
|
Returns:
Type | Description |
---|---|
The token for api key authentication. |
Source code in cheshire_cat_api/configuration.py
get_basic_auth_token()
Gets HTTP basic authentication header (string).
Returns:
Type | Description |
---|---|
The token for basic HTTP authentication. |
Source code in cheshire_cat_api/configuration.py
get_default()
classmethod
Return the default configuration.
This method returns newly created, based on default constructor, object of Configuration class or returns a copy of default configuration.
Returns:
Type | Description |
---|---|
The configuration object. |
Source code in cheshire_cat_api/configuration.py
get_default_copy()
classmethod
Deprecated. Please use get_default
instead.
Deprecated. Please use get_default
instead.
Returns:
Type | Description |
---|---|
The configuration object. |
get_host_from_settings(index, variables=None, servers=None)
Gets host URL based on the index and variables
Parameters:
Name | Type | Description | Default |
---|---|---|---|
index
|
array index of the host settings |
required | |
variables
|
hash of variable and the corresponding value |
None
|
|
servers
|
an array of host settings or None |
None
|
Returns:
Type | Description |
---|---|
URL based on host settings |
Source code in cheshire_cat_api/configuration.py
get_host_settings()
Gets an array of host settings
Returns:
Type | Description |
---|---|
An array of host settings |
set_default(default)
classmethod
Set default instance of configuration.
It stores default configuration, which can be returned by get_default_copy method.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
default
|
object of Configuration |
required |
Source code in cheshire_cat_api/configuration.py
to_debug_report()
Gets the essential information for debugging.
Returns:
Type | Description |
---|---|
The report for debugging. |