Render the model to a string. If the model is not supported, fall back to `self._unsupported_renderer` that by default returns an empty string.
(cls, model)
| 18 | |
| 19 | @classmethod |
| 20 | def render(cls, model) -> str: |
| 21 | """ |
| 22 | Render the model to a string. If the model is not supported, fall back to |
| 23 | `self._unsupported_renderer` that by default returns an empty string. |
| 24 | """ |
| 25 | |
| 26 | return cls.model_renderers.get(type(model), cls._unsupported_renderer)(model) # type: ignore |
| 27 | |
| 28 | @classmethod |
| 29 | def renderer_for(cls, model_cls: Type) -> Callable: |