INNER CODE UNIT · Python

htmy_context

volfpeter/htmy · htmy/core.py:56

    def htmy_context(self) -> Context:
        """Returns the context for child rendering."""
        return self._context


# -- Context utilities

_MISSING: Any = object()


class ContextAware:
    """
    Base class with utilities for safe context use.

    Features:

    - Register subclass instance in a context.
    - Load subclass instance from context.

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…