deckhand.engine.render module

deckhand.engine.render.render(revision_id, documents, encryption_sources=None, cleartext_secrets=False)[source]

Render revision documents for revision_id using raw documents.

Parameters:
  • revision_id (int) – Key used for caching rendered documents by.
  • documents (List[dict]) – List of raw documents corresponding to revision_id to render.
  • encryption_sources (dict) – A dictionary that maps the reference contained in the destination document’s data section to the actual unecrypted data. If encrypting data with Barbican, the reference will be a Barbican secret reference.
  • cleartext_secrets (bool) – Whether to show unencrypted data as cleartext.
Returns:

Rendered documents for revision_id.

Return type:

List[dict]

deckhand.engine.render.validate_render(revision_id, rendered_documents, validator)[source]

Validate rendered documents using validator.

Parameters:
  • revision_id (int) – Key used for caching rendered documents by.
  • documents (List[dict]) – List of rendered documents corresponding to revision_id.
  • validator (deckhand.engine.document_validation.DocumentValidation) – Validation object used for validating rendered_documents.
Raises:

InvalidDocumentFormat if validation fails.