comet.datapool

The comet.datapool module provides global connection access for the current session and facilities to establish the global comet data connection.

Methods

comet.datapool.getConnection()

Get the current global data connection if it is established.

Returns:

The active data connection

The type is dependant of the connection itself:

Return type:

None | CSOAP | CSQL | str

Available:

InDesign® comet_pdf® Illustrator®

CScript:
comet.datapool.getSessionID()

Get the session ID of the current publishing server connection.

Returns:

The session ID if available, else empty str.

Return type:

str

Available:

InDesign® comet_pdf® Illustrator®

CScript:

system::session_id

comet.datapool.loginSOAP(host, user='', password='', language='', client='', lazy=True)

Establish the global data connection by connecting to a SOAP service, e.g. a publishing server.

Parameters:
  • host (str) – Service name

  • user (str) – Username

  • password (str) – Password

  • language (str) – Language

  • client (str) – Client

  • lazy (bool) – Only login when the connection is different than the current one?

Returns:

The new connection

Return type:

CSOAP

Raises:
Available:

InDesign® comet_pdf® Illustrator®

CScript:

datapool::login

comet.datapool.loginDB(host, user='', password='', database='', client='', lazy=True)

Establish the global data connection by connecting to an SQL database.

Parameters:
  • host (str) – Service name

  • user (str) – Username

  • password (str) – Password

  • database (str) – Database name

  • client (str) – Client

  • lazy (bool) – Only login when the connection is different than the current one?

Returns:

The new connection

Return type:

CSQL

Raises:
Available:

InDesign® comet_pdf® Illustrator®

CScript:

datapool::login

comet.datapool.loginXML(path)

Establish the global data connection by connecting to a local XML pool.

Parameters:

path (str) – The path to the local XML pool

Return type:

None

Raises:
Available:

InDesign® comet_pdf® Illustrator®

CScript:

datapool::login

comet.datapool.logout()

Disconnect the global data connection.

Return type:

None

CScript:

datapool::logout