Plugin Registry¶
API reference for the plugin registry functions in quprep.plugins.
register_encoder¶
quprep.plugins.register_encoder(name)
¶
Register a custom encoder class under name.
Can be used as a class decorator or called directly:
.. code-block:: python
@register_encoder("my_enc")
class MyEncoder(BaseEncoder): ...
# or:
register_encoder("my_enc")(MyEncoder)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Encoding name used in :func: |
required |
Returns:
| Type | Description |
|---|---|
Callable
|
A decorator that registers and returns the class unchanged. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
Source code in quprep/plugins.py
register_exporter¶
quprep.plugins.register_exporter(name)
¶
Register a custom exporter class under name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Framework name used in :func: |
required |
Returns:
| Type | Description |
|---|---|
Callable
|
A decorator that registers and returns the class unchanged. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If |