adobe.pdfservices.operation.config.proxy package

Submodules

adobe.pdfservices.operation.config.proxy.proxy_authentication_credentials module

class adobe.pdfservices.operation.config.proxy.proxy_authentication_credentials.ProxyAuthenticationCredentials

Bases: ABC

This abstract class represents the basic contract for the credentials to be used with ProxyServerConfig.

adobe.pdfservices.operation.config.proxy.proxy_scheme module

class adobe.pdfservices.operation.config.proxy.proxy_scheme.ProxyScheme(value, names=None, *values, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

Supported scheme types for ProxyServerConfig.

HTTP = 'http'

Represents HTTP scheme.

HTTPS = 'https'

Represents HTTPS scheme.

classmethod get(proxy_scheme)

Returns the instance of ProxyScheme for the input string.

Parameters:

proxy_scheme (str) – String value of the scheme.

Returns:

the instance of ProxyScheme for the input string.

Return type:

ProxyScheme

adobe.pdfservices.operation.config.proxy.proxy_server_config module

class adobe.pdfservices.operation.config.proxy.proxy_server_config.ProxyServerConfig(host: str, *, port: int = None, scheme: ProxyScheme = ProxyScheme.HTTP, credentials: ProxyAuthenticationCredentials = None)

Bases: object

Encapsulates the proxy server configurations.

Creates an instance of ProxyServerConfig.

Parameters:
  • host (str) – Host name. (Optional, use key-value)

  • port (int) – port number of proxy server. It should be greater than 0. Scheme’s default port is used if not provided. (Optional, use key-value)

  • scheme (ProxyScheme) – scheme of proxy server. Possible values are HTTP and HTTPS. Default value is HTTP. (Optional, use key-value)

  • credentials (ProxyAuthenticationCredentials) – ProxyAuthenticationCredentials} instance. (Optional, use key-value)

HTTPS_PORT = 443

Represents default port for HTTPS scheme.

HTTP_PORT = 80

Represents default port for HTTP scheme.

from_json(json_data: dict)

Creates a proxy server instance from a json file.

{
"proxyServerConfig": {
        "host": "127.0.0.1",
        "port": "8080",
        "scheme": "https",
        "usernamePasswordCredentials": {
            "username": "username",
            "password": "password"
        }
    },
}
Parameters:

json_data (dict) – A dictionary containing proxy server config in the specified format.

get_credentials()
Returns:

the credentials for authenticating with a proxy server.

Return type:

ProxyAuthenticationCredentials

get_host()
Returns:

the host name of proxy server.

Return type:

str

get_port()
Returns:

the port number of proxy server.

Return type:

int

classmethod get_port_based_on_scheme(scheme: ProxyScheme)

Used internally by the SDK.

get_proxy_scheme()
Returns:

the scheme of proxy server.

Return type:

ProxyScheme

proxy_config_map() dict[str, str]

Used internally by the SDK.

adobe.pdfservices.operation.config.proxy.username_password_credentials module

class adobe.pdfservices.operation.config.proxy.username_password_credentials.UsernamePasswordCredentials(username: str, password: str)

Bases: ProxyAuthenticationCredentials

Simple ProxyAuthenticationCredentials implementation based on a username and password.

Constructs an instance of UsernamePasswordCredentials.

Parameters:
  • username (str) – Username. Cannot be none or empty.

  • password (str) – Password. Cannot be none or empty.

from_json(json_data: dict)

Constructs a UsernamePasswordCredentials instance from a dictionary in the specified format.

Parameters:

json_data (dict) – JSON data in the form of a dictionary.

get_password() str
Returns:

the password.

Return type:

str

get_username() str
Returns:

the username.

Return type:

str

Module contents