relationalai.std.inspect.pprint()
pprint( type: Type, props: list[str]|None, limit: int = 20, silent = False) -> None
Pretty prints a table containing a sample of the objects in type
and their statically known properties.
Parameters
Section titled “Parameters”Name | Type | Description |
---|---|---|
type | Type | The type to pretty print. |
props | list[str] or None | The properties to inspect. If None , inspects all statically known properties. |
limit | int | The maximum number of objects to sample. (Default: 20) |
Returns
Section titled “Returns”None
.
Example
Section titled “Example”import relationalai as raifrom relationalai.std.inspect import pprint
# =====# SETUP# =====
model = rai.Model("people")Person = model.Type("Person")
with model.rule(): Person.add(name="Joe", age=30) Person.add(name="Susan", age=32)
# =======# EXAMPLE# =======
pprint(Person)# person name age# ──────────────────────────────────────# aiTt+pn1Y6IexW+u9SgXhg Susan 32# ppSccXmTLAgcxu4ZWgcKug Joe 30