molly.apps.library – Library Search

This application provides a front-end to electronic library catalogues.


  • provider: the provider which provides search results
  • library_identifier: if set, this is used to look up entities (from the places app) in this identifier namespace which have the value of the library code as returned by the query


Application('molly.apps.library', 'library', 'Library search',
            provider = Provider('molly.apps.library.providers.Z3950',
                        host = '',
                        syntax = 'XML',
                        database = 'COPAC'),



This provides the library app with the ability to query library catalogues using the Z39.50 protocol. It supports the following options:

  • host: The hostname of the Z39.50 server to connect to
  • database: The name of the database on the server to use
  • port (optional, defaults to 210): The port on which the Z39.50 server listens
  • syntax (optional, defaults to USMARC): The syntax which the server uses for responses (currently supported: USMARC and XML)
  • charset (optional, defaults to UTF-8): The encoding to use when communicating with the server
  • control_number_key (optional, defaults to 12): The ‘use attribute’ to query on when doing a control number lookup,
  • results_encoding (optional, defaults to marc8): The encoding results come back in. Valid values are ‘marc8’ and ‘unicode’. Aleph needs ‘unicode’.

Writing Your Own Providers