Rendering API
Rendering converts canonical records into owned derived documents. Rendering is deterministic; export and artifact initialization are the side-effecting steps.
.. py:module:: memoryledger.render
.. py:class:: RenderResult(root_text, linked_docs, nested_docs)
- module:
memoryledger.render
Bases: :py:class:
objectRendered root, linked, and nested documents before export.
- type root_text:
- sphinx_autodoc_typehints_type:
\:py\:class\:\str``
- param root_text:
- type linked_docs:
:sphinx_autodoc_typehints_type:
\:py\:class\:\dict`\ \[:py:class:`str`, :py:class:`str`]`- param linked_docs:
- type nested_docs:
:sphinx_autodoc_typehints_type:
\:py\:class\:\dict`\ \[:py:class:`str`, :py:class:`str`]`- param nested_docs:
.. py:function:: render_all(config)
- module:
memoryledger.render
Render eligible records deterministically without writing output.
- type config:
- sphinx_autodoc_typehints_type:
\:py\:class\:\~memoryledger.models.Config``
- param config:
- rtype:
- sphinx_autodoc_typehints_type:
\:py\:class\:\~memoryledger.render.RenderResult``
.. py:function:: write_rendered(config, result, out=None)
- module:
memoryledger.render
Write generated artifacts to the configured artifact destination.
- type config:
- sphinx_autodoc_typehints_type:
\:py\:class\:\~memoryledger.models.Config``
- param config:
- type result:
:sphinx_autodoc_typehints_type:
\:py\:class\:\~memoryledger.render.RenderResult``- param result:
- type out:
:sphinx_autodoc_typehints_type:
\:py\:class\:\~pathlib.Path` | :py:obj:`None``- param out:
- rtype:
- sphinx_autodoc_typehints_type:
\:py\:class\:\list`\ \[:py:class:`~pathlib.Path`]`
.. py:function:: export(config, result, out=None, backup=False, include_nested=False)
- module:
memoryledger.render
Export generated documents while protecting manual destinations.
- type config:
- sphinx_autodoc_typehints_type:
\:py\:class\:\~memoryledger.models.Config``
- param config:
- type result:
:sphinx_autodoc_typehints_type:
\:py\:class\:\~memoryledger.render.RenderResult``- param result:
- type out:
:sphinx_autodoc_typehints_type:
\:py\:class\:\~pathlib.Path` | :py:obj:`None``- param out:
- type backup:
:sphinx_autodoc_typehints_type:
\:py\:class\:\bool``- param backup:
- type include_nested:
:sphinx_autodoc_typehints_type:
\:py\:class\:\bool``- param include_nested:
.. py:module:: memoryledger.adopt
.. py:class:: AdoptionProposal(title, content, kind, origin, source_hash, render_target=’linked_doc’)
- module:
memoryledger.adopt
Bases: :py:class:
object- type title:
- sphinx_autodoc_typehints_type:
\:py\:class\:\str``
- param title:
- type content:
:sphinx_autodoc_typehints_type:
\:py\:class\:\str``- param content:
- type kind:
:sphinx_autodoc_typehints_type:
\:py\:class\:\str``- param kind:
- type origin:
:sphinx_autodoc_typehints_type:
\:py\:class\:\str``- param origin:
- type source_hash:
:sphinx_autodoc_typehints_type:
\:py\:class\:\str``- param source_hash:
from memoryledger.render import render_all
Adoption APIs are preview-first and preserve source hashes and backups.