foliolib.folio.config.Config

class foliolib.folio.config.Config(tenant: str)

Bases: foliolib.folio.FolioService

Parameters

tenant (str) – Tenant id

Methods

delete_entry(module, configName, code)

get_entries([module])

get_entry(module, configName, code)

get_folio_host()

set_email(smtp_host, smtp_port, email_from, ...)

Set email configuration for a tenant.

set_entry(entry)

set_folio_host(folio_host)

delete_entry(module, configName, code)
get_entries(module=None)
get_entry(module, configName, code)
get_folio_host()
set_email(smtp_host: str, smtp_port: str, email_from: str, username: str, password: str, ssl: bool = False, smtp_login_option: Optional[str] = None, start_tls: Optional[str] = None, trust_all: Optional[bool] = None, auth_methods: Optional[str] = None)

Set email configuration for a tenant. AUTH_METHODS authentication methods ‘CRAM-MD5 LOGIN PLAIN’

Parameters
  • smtp_host (str) – The host of the smtp server.

  • smtp_port (str) – The port of the smtp server.

  • email_from (str) – The ‘from’ property of the email.

  • username (str) – The username for the login.

  • password (str) – The password for the login.

  • ssl (bool, optional) – sslOnConnect mode for the connection. Defaults to False.

  • smtp_login_option (str, optional) – The login mode for the connection. Examples are DISABLED, OPTIONAL or REQUIRED Defaults to DISABLED.

  • start_tls (str, optional) – TLS security mode for the connection. Examples are NONE, OPTIONAL or REQUIRED Defaults to NONE.

  • trust_all (bool, optional) – trust all certificates on ssl connect.

  • auth_methods (str, optional) – Authentication methods. Example is ‘CRAM-MD5 LOGIN PLAIN’.

set_entry(entry: foliolib.folio.config.ConfigEntry)
set_folio_host(folio_host)