Visual examples¶
Preserve types and resolve nested values¶
A placeholder occupying the entire value preserves its type: numbers and booleans reach the API as numbers and booleans.
from paylo import render_template
body = render_template(
{"name": "{{customer.name}}", "active": "{{active}}", "count": "{{count}}"},
{"customer": {"name": "Ana"}, "active": True, "count": 3},
)
assert body == {"name": "Ana", "active": True, "count": 3}
Create a payload from Robot Framework¶
Reuse the dictionary from each iteration; Paylo prepares the payload and RequestsLibrary sends the request.
*** Settings ***
Library Paylo
*** Test Cases ***
Create Payload From Data
VAR &{values} name=Ana active=${True} quantity=${3}
${body}= Render JSON {"name":"{{name}}","active":"{{active}}","quantity":"{{quantity}}"} ${values}
Should Be Equal ${body}[active] ${True}
Should Be Equal As Integers ${body}[quantity] 3
Detect missing variables¶
A missing variable raises an explicit error before sending a request.
from paylo import render_template, MissingVariableError
try:
render_template({"email": "{{email}}"}, {})
except MissingVariableError as error:
print(error)
Result screenshot¶

This capture is generated by the Python Paylo engine from the typed, nested-value example above. It shows the template, iteration data and resulting request body; it is independent of the interactive demo.
Interactive demo¶
The demo follows the documentation language and lets you experiment with values. It is a JavaScript simulation; the examples above execute the Python library.
[{"name": "English", "lang": "en", "link": "/robotframework-paylo/examples/", "fragments": {"visual-examples": "visual-examples", "preserve-types-and-resolve-nested-values": "preserve-types-and-resolve-nested-values", "create-a-payload-from-robot-framework": "create-a-payload-from-robot-framework", "detect-missing-variables": "detect-missing-variables", "result-screenshot": "result-screenshot", "interactive-demo": "interactive-demo"}, "current": true}, {"name": "Espa\u00f1ol", "lang": "es", "link": "/robotframework-paylo/es/examples/", "fragments": {"visual-examples": "ejemplos-visuales", "preserve-types-and-resolve-nested-values": "conservar-tipos-y-resolver-rutas-anidadas", "create-a-payload-from-robot-framework": "crear-un-payload-desde-robot-framework", "detect-missing-variables": "detectar-variables-faltantes", "result-screenshot": "captura-del-resultado", "interactive-demo": "demo-interactiva"}, "current": false}]