Functions
register
Register debug utility functions with Jinja2 environment.
register
def register(env: Environment, site: Site) -> None
Register debug utility functions with Jinja2 environment.
Parameters 2
| Name | Type | Default | Description |
|---|---|---|---|
env |
Environment |
— | |
site |
Site |
— |
debug
Pretty-print variable for debugging.
debug
def debug(var: Any, pretty: bool = True) -> str
Pretty-print variable for debugging.
Parameters 2
| Name | Type | Default | Description |
|---|---|---|---|
var |
Any |
— | Variable to debug |
pretty |
bool |
True |
Use pretty printing (default: True) |
Returns
String representation of variablestr
—
typeof
Get the type of a variable.
typeof
def typeof(var: Any) -> str
Get the type of a variable.
Parameters 1
| Name | Type | Default | Description |
|---|---|---|---|
var |
Any |
— | Variable to check |
Returns
Type name as stringstr
—
inspect
Inspect object attributes and methods.
inspect
def inspect(obj: Any) -> str
Inspect object attributes and methods.
Parameters 1
| Name | Type | Default | Description |
|---|---|---|---|
obj |
Any |
— | Object to inspect |
Returns
List of attributes and methodsstr
—