Derived¶
didactic.api.derived ¶
Mark a method as a cached derivation on a Model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
fn
|
Callable[..., FieldValue]
|
The method to mark. Takes |
required |
Returns:
| Type | Description |
|---|---|
property
|
A descriptor that returns the cached value on access. The
cache lives on the instance under |
Examples: