Quick start
This page walks through your first render — from key to PDF — without touching the dashboard.
Set your API key
Section titled “Set your API key”Export your key into the environment your script runs in:
export POLI_PAGE_API_KEY=pp_test_...Render a PDF
Section titled “Render a PDF”from poli_page import PoliPage
client = PoliPage() # picks up POLI_PAGE_API_KEY from the environment
pdf = client.render.pdf({ "project": "billing", "template": "invoice", "data": {"invoiceNumber": "INV-001", "total": 1280},})pdf is bytes. Write it to disk, upload it to S3, or return it directly from a web handler.
Example
Section titled “Example”from pathlib import Pathfrom poli_page import PoliPage
client = PoliPage() # picks up POLI_PAGE_API_KEY from the environment
pdf = client.render.pdf({ "project": "billing", "template": "invoice", "data": {"invoiceNumber": "INV-001", "total": 1280},})
Path("./invoice.pdf").write_bytes(pdf)