Backend
Sub classes¶
| Name | Children | Inherits |
|---|---|---|
| MarkdownParser mkconvert.parsers.base Base class for Markdown -> HTML parsers. |
||
| HtmlToMarkdownConverter mkconvert.converters.base Base class for HTML -> Markdown converters. |
Base classes¶
| Name | Children | Inherits |
|---|---|---|
| ABC abc Helper class that provides a standard way to create an ABC using |
||
| Generic typing Abstract base class for generic types. |
⋔ Inheritance diagram¶
graph TD
1836221132["_core.Backend"]
925645236["abc.ABC"]
2751680898["builtins.object"]
3481597255["typing.Generic"]
925645236 --> 1836221132
2751680898 --> 925645236
3481597255 --> 1836221132
2751680898 --> 3481597255
🛈 DocStrings¶
Bases: ABC
Base class for Markdown parsers and HTML-to-Markdown converters.
Source code in src/mkconvert/_core.py
requires
class-attribute
¶
Import names of the packages the backend needs.
supported_options
class-attribute
¶
Common options this backend can set to a non-default value.
__init__
¶
__init__(options: O | None = None, *, on_unsupported: OnUnsupported = 'warn')
Check dependencies and options.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
options
|
O | None
|
Common options; |
None
|
on_unsupported
|
OnUnsupported
|
What to do with options this backend cannot honour:
|
'warn'
|
Raises:
| Type | Description |
|---|---|
MissingDependencyError
|
A required package is not installed. |
UnsupportedOptionError
|
Unsupported options are set and
|
Source code in src/mkconvert/_core.py
convert
abstractmethod
¶
is_available
classmethod
¶
require
classmethod
¶
Raise MissingDependencyError if a required package is missing.