adobe.pdfservices.operation.config package

Subpackages

Submodules

adobe.pdfservices.operation.config.client_config module

class adobe.pdfservices.operation.config.client_config.ClientConfig(*, connect_timeout: int = 4000, read_timeout: int = 10000, region: Region = Region.US, proxy_server_config: ProxyServerConfig = None)

Bases: object

Encapsulates the API request configurations.

Constructs an instance of ClientConfig.

Parameters:
  • connect_timeout (int) – determines the timeout in milliseconds until a connection is established in the API calls. Default value is 4000 milliseconds.

  • read_timeout (int) – Defines the read timeout in milliseconds, The number of milliseconds the client will wait for the server to send a response after the connection is established. Default value is 10000 milliseconds

  • region (Region) – Default value is US.

  • proxy_server_config (ProxyServerConfig) – Sets the configuration for proxy server.

from_file(client_config_file_path: str)

Sets the connect timeout and read timeout using the JSON client config file path. All the keys in the JSON structure are optional.

Parameters:

client_config_file_path (str) – JSON client config file path

Returns:

This Builder instance to add any additional parameters.

Return type:

ClientConfig.Builder

JSON structure:

{
    "connectTimeout": "4000",
    "readTimeout": "20000",
    "proxyServerConfig": {
        "host": "127.0.0.1",
        "port": "8080",
        "scheme": "https",
        "usernamePasswordCredentials": {
            "username": "username",
            "password": "password"
            }
    },
    "region": "EU"
}
get_connect_timeout()
Returns:

Connect timeout.

Return type:

int

get_pdf_services_uri()
Returns:

The PDF Service URI used.

Return type:

str

get_proxy_server_config()
Returns:

Proxy server config used.

Return type:

ProxyServerConfig

get_read_timeout()
Returns:

Read timeout.

Return type:

int

validate()

Validator for the created client config.

Module contents