Class ConnectPipe

Configuration class for connecting to LibreOffice via pipe. By default no configuration is required.

Lo.ConnectPipe is an alias of this class.

Example:

from ooodev.loader.lo import Lo

loader = Lo.load_office(Lo.ConnectPipe())
class ooodev.conn.connectors.ConnectPipe(pipe=None, **kwargs)[source]

Bases: ConnectorBridgeBase

Connect to LO via pipe

Parameters:

pipe (str | None) –

__init__(pipe=None, **kwargs)[source]

Constructor

Parameters:

pipe (str | None, optional) – Name of pipe. Auto generated if None. Defaults to None.

Keyword Arguments:
  • no_restore (bool, optional) – Default True

  • no_first_start_wizard (bool, optional) – Default True

  • no_logo (bool, optional) – Default True

  • invisible (bool, optional) – Default True

  • headless (bool, optional) – Default False

  • start_as_service (bool, optional) – Default False

  • start_office (bool, optional) – Default True

  • soffice (Path | str, optional) – Path to soffice

  • env_vars (Dict[str, str], optional) – Environment variables to be set when starting office

  • extended_args (List[str], optional) – Extended arguments to be passed to soffice, such as ["--display :0"].

  • remote_connection (bool, optional) – Specifies if the connection is to a remote server. Default is False

Return type:

None

static deserialize(data)[source]

Deserializes connection string.

New in version 0.44.0.

Return type:

ConnectPipe

Parameters:

data (str) –

get_connection_identifier()[source]

Gets connection identifier

Such as pipe,name="a34rt84y002"

Return type:

str

get_connection_str()[source]

Gets connection string.

Such as uno:socket,host=localhost,port=2002;urp;StarOffice.ServiceManager

Return type:

str

serialize()[source]

Gets serialized connection string.

New in version 0.44.0.

Return type:

str

property env_vars: Dict[str, str]

Gets/Sets environment variables to be set when starting office

Return type:

Dict[str, str]

property extended_args: List[str]

Extended arguments to be passed to soffice such as [--display : 0]

Return type:

List[str]

property headless: bool

Gets/Sets if the connection is made using headless option. Default is False

Return type:

bool

property invisible: bool

Gets/Sets if office is started with invisible option. Default is True

Return type:

bool

property no_first_start_wizard: bool

Gets/Sets if office is started with nofirststartwizard option. Default is True

Return type:

bool

Gets/Sets if office is started with nologo option. Default is True

Return type:

bool

property no_restore: bool

Gets/Sets if office is started with norestore Option. Default is True

Return type:

bool

property pipe: str

Gets/Sets pipe used to connect. Default is auto generated hex value

Return type:

str

property remote_connection: bool

Specifies if the connection is to a remote server. Default is False

Return type:

bool

property soffice: Path

Get/Sets Path to LibreOffice soffice. Default is auto discovered.

Return type:

Path

property start_as_service: bool

Gets/Sets if office is started as service (StarOffice.Service). Default is False

Return type:

bool

property start_office: bool

Gets/Sets if office is to be started. Default is True

Return type:

bool