sdk.lusid.extensions.api_configuration.ApiConfiguration

class ApiConfiguration(token_url=None, api_url=None, username=None, password=None, client_id=None, client_secret=None, app_name=None, certificate_filename=None, proxy_config=None, access_token=None)[source]

The configuration required to access LUSID, read more at https://support.finbourne.com/getting-started-with-apis-sdks

Parameters:
  • token_url (str) – The token URL of the identity provider

  • api_url (str) – The API URL for the LUSID client

  • username (str) – The username to use

  • password (str) – The password to use

  • client_id (str) – The client id to use

  • client_secret (str) – The client secret to use

  • app_name (str) – The name of the application calling LUSID

  • certificate_filename (str) – Name of the certificate file (.pem, .cer or .crt)

  • proxy_config (lusid.extensions.ProxyConfig) – The proxy configuration to use

Attributes

This is a Pydantic class. For now, click on the green [source] link in the class signature above to see descriptions/allowed values for these attributes.

api_url

app_name

certificate_filename

client_id

client_secret

password

proxy_config

token_url

username

Methods

build_api_client_config

Builds lusid.Configuration for initialising an api client.

get_access_token

Gets either the set personal access token, or a RefreshingToken using OIDC parameters

build_api_client_config(tcp_keep_alive=True, socket_options=[(6, 1, 1), (1, 9, 1), (6, 4, 60), (6, 5, 60), (6, 6, 3)], id_provider_response_handler=None)[source]

Builds lusid.Configuration for initialising an api client.

Return type:

Configuration

Parameters:
  • tcp_keep_alive (bool, optional) – Should socket options for tcp keep alive pings be set, by default True

  • socket_options (Optional[ Union[Tuple[Any, Any, Any], Tuple[Any, Any, None, int]] ], optional) – A set of custom options to configure on connections, by default keep_alive_socket_options()

  • id_provider_response_handler (Optional[Callable[[Response], None]], optional) – A function to run on response from the identity provider, by default None

Returns:

config which can be used to initialise an api client

Return type:

Configuration

get_access_token(id_provider_response_handler=None)[source]

Gets either the set personal access token, or a RefreshingToken using OIDC parameters

Return type:

Union[str, RefreshingToken]

Returns:

Token that can be used to authenticate to LUSID

Return type:

Union[str, RefreshingToken]