Service Reference

The services Module

A collection of services.

ciowarehouse.services.includeme(configurator)[source]

Function to include CioWarehouse services.

Parameters:

configurator (pyramid.config.Configurator) – Object used to do configuration declaration within the application.

The services.inputs Module

A service to periodically retrieve inputs (file, FTP, email), apply rules and possibly import new documents.

ciowarehouse.services.inputs.includeme(configurator)[source]

Function to include inputs service.

Parameters:

configurator (pyramid.config.Configurator) – Object used to do configuration declaration within the application.

class ciowarehouse.services.inputs.ServiceInputs(registry)[source]

Class to manage inputs service.

See: chrysalio.lib.service.Service

This service loops over input streams. Each stream returns a list of documents. Documents are submitted to the input rules. The first rule that matches with a document determines its destination.

Regardless of its origin, a document is represented by a dictionary with the following keys:

  • 'stream-id'

  • 'stream-type'

  • 'from'

  • 'to'

  • 'title'

  • 'organization'

  • 'language'

  • 'datetime'

  • 'path'

  • 'filename'

  • 'dirname'

  • 'source'

  • 'body'

warehouse(build, warehouse_id)[source]

Return the warehouse with ID warehouse_id or None.

Parameters:
  • build (cioservice.lib.build.Build) – Current build object.

  • warehouse_id (str) – ID of the warehouse to return.

Return type:

lib.warehouse.Warehouse or None