| 1 |
# Extensions |
| 2 |
|
| 3 |
## :warning: Work in Progress! |
| 4 |
|
| 5 |
The Python handler supports extensions through |
| 6 |
[*mkdocstrings*' handler extensions](https://mkdocstrings.github.io/usage/handlers/#handler-extensions). |
| 7 |
|
| 8 |
Specifically, additional templates can be added to the handler, |
| 9 |
and Griffe extensions can instruct the handler to use a particular template |
| 10 |
for a particular object by setting a value in the Griffe object's `extra` dictionary: |
| 11 |
|
| 12 |
```python title="griffe_extension.py" |
| 13 |
obj = ... # get a reference to a Griffe object |
| 14 |
if "mkdocstrings" not in obj.extra: |
| 15 |
obj.extra["mkdocstrings"] = {} |
| 16 |
obj.extra["mkdocstrings"]["template"] = "template_name.html" |
| 17 |
``` |