Skip to main content

rendral (Python)

Official Python client for the Rendral. Standard library only — no dependencies.

pip install rendral

Quickstart

import os
from rendral import RenderClient

client = RenderClient(os.environ["RENDER_API_KEY"])

# HTML → PDF
pdf = client.pdf(html="<h1>Invoice #1042</h1>", options={"pageNumbers": True, "format": "A4"})
with open("invoice.pdf", "wb") as f:
    f.write(pdf)

# A live URL → PDF
client.pdf(url="https://example.com")

Everything it does

# Screenshot (PNG/JPEG/WebP, full page, or one element)
client.screenshot(url="https://example.com", options={"fullPage": True})
client.screenshot(html=html, options={"selector": "#card", "omitBackground": True})

# 1200×630 Open Graph image
client.og(title="Ship faster", eyebrow="Changelog", theme="dark")

# Merge PDFs
client.merge([pdf_a, pdf_b])  # list[bytes]

# Watermark every page
client.watermark(pdf, "CONFIDENTIAL", options={"opacity": 0.15, "rotate": 45})

Errors

Non-2xx responses raise RenderError with the API's machine-readable code and request id:

from rendral import RenderError

try:
    client.pdf(html=html)
except RenderError as e:
    print(e.status, e.code, e.request_id)  # e.g. 402 "quota_exceeded" "a1ab…"

Options

RenderClient(api_key, base_url=...) — override base_url to point at your deployment. Every method returns bytes. See the API docs for the full option reference.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rendral-0.5.0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rendral-0.5.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file rendral-0.5.0.tar.gz.

File metadata

  • Download URL: rendral-0.5.0.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for rendral-0.5.0.tar.gz
Algorithm Hash digest
SHA256 19a1f8814b7c92f24160271f2912207c8b82c2d8947d0bd1697decdf54301e3f
MD5 edbc76e9062c1859a19a20452195ea51
BLAKE2b-256 2c1c765e81462a4bb245b7fbfb6b0682ececbb72a2322e6a57c7e388e3453944

See more details on using hashes here.

File details

Details for the file rendral-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: rendral-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for rendral-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c1b89b1a456bb4518570d2bf31c806ae74aa495324be0e2e61cafb5e1445dcf2
MD5 851db6c3fe7630ca2bcfa4261ba96ada
BLAKE2b-256 4f646723a8e35af0c4f9a96d24977bc44d7262a5fc49c851e05679ad34eb0496

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page