srgweb/reference/preview.qmd
2025-06-06 18:10:01 +03:00

24 lines
425 B
Plaintext

# preview { #quartodoc.preview }
```python
preview(ast, max_depth=999, compact=False, as_string=False)
```
Print a friendly representation of a griffe object (e.g. function, docstring)
## Examples {.doc-section .doc-section-examples}
```python
>>> from quartodoc import get_object
>>> obj = get_object("quartodoc", "get_object")
```
```python
>>> preview(obj.docstring.parsed)
...
```
```python
>>> preview(obj)
...
```