Configuration

Invenio module that add SIP2 communication for self-check.

SIP2_MESSAGE_ACTIONS Dictionary of all selfcheck actions.
SIP2_ACTIONS_HANDLERS Dictionary of action handlers. See example below.
SIP2_SELFCHECK_MESSAGE_TYPES Define all message types conforming to SIP2 protocol.
SIP2_FIXED_FIELD_DEFINITION All fixed field available.
SIP2_VARIABLE_FIELD_DEFINITION All variable field available.

Each custom handler actions must be defined in the SIP2_ACTIONS_HANDLERS dictionary, where the keys are the application names and the values the configuration parameters for the application.

SIP2_ACTIONS_HANDLERS = dict(
    myapp=dict(
        # configuration values for myapp ...
    ),
)

The application name is used to start invenio-sip2 server and call customized handlers.

Remote application Handlers

Handlers allow customizing endpoints for each selfcheck actions:

Configuration of a single remote application is a dictionary with the following keys:

  • login_handler - Import path to login selfcheck callback handler.
  • logout_handler - Import path to logout selfcheck callback handler.
  • system_status_handler - Import path to automated system status callback handler.
  • patron_handlers - A dictionary of import path to patron callback handler.
    • validate_patron - Import path to validate patron callback handler.
    • authorize_patron - Import path to authorize patron callback handler.
    • enable_patron - Import path to enable patron callback handler.
    • account - Import path to retrieve patron account callback handler.
SIP2_REMOTE_ACTION_HANDLERS = dict(
    app=dict(
        login_handler="...",
        logout_handler="...",
        system_status_handler="...",
        patron_handlers=dict(
            validate_patron="...",
            authorize_patron="...",
            enable_patron="...",
            account="...",
        )
    )
)
invenio_sip2.config.SIP2_CHECKSUM_CONTROL = True

Message checksum control.

invenio_sip2.config.SIP2_DATE_FORMAT = '%Y%m%d %H%M%S'

SIP2 date format.

invenio_sip2.config.SIP2_LINE_TERMINATOR = '\r'

Message line separator.

invenio_sip2.config.SIP2_PROTOCOL = '2.00'

SIP2 protocol version.

invenio_sip2.config.SIP2_REMOTE_ACTION_HANDLERS = {}

Configuration of remote handlers.

invenio_sip2.config.SIP2_RETRIES_ALLOWED = 10

Number of retries allowed.

invenio_sip2.config.SIP2_SOCKET_BUFFER_SIZE = '1024'

Socket buffer size.

invenio_sip2.config.SIP2_SUPPORT_CHECKIN = True

Support check in items.

invenio_sip2.config.SIP2_SUPPORT_CHECKOUT = True

Support check out items.

invenio_sip2.config.SIP2_SUPPORT_OFFLINE_STATUS = True

Support off line operation.

invenio_sip2.config.SIP2_SUPPORT_ONLINE_STATUS = True

Support online status send by automatic circulation system.

invenio_sip2.config.SIP2_SUPPORT_RENEWAL_POLICY = True

Support patron renewal requests as a policy.

invenio_sip2.config.SIP2_SUPPORT_STATUS_UPDATE = True

Support patron status updating by the selfcheck.

invenio_sip2.config.SIP2_TEXT_ENCODING = 'UTF-8'

Message text charset encoding.

invenio_sip2.config.SIP2_TIMEOUT_PERIOD = 10

Server timeout.