Skip to main content

ironfang-render

The official Python client for the Ironfang Render API: screenshots, PDFs, QR codes, template images, clips and site previews from a URL or from HTML you send. No dependencies; Python 3.10 and later.

Formerly ironfang-renderwolf. import ironfang_renderwolf and the old Renderwolf and RenderwolfError names still work with a deprecation warning, and webhooks still carry the Renderwolf-* headers.

pip install ironfang-render
import os
from ironfang_render import IronfangRender

with IronfangRender(api_key=os.environ["IRONFANG_API_KEY"]) as rw:
    shot = rw.screenshot(url="https://example.com", full_page=True)
    shot.save("page.png")
    print(shot.credits, shot.render_ms, shot.request_id)

Every render returns the bytes plus what the API reports about them: content type, credits charged (zero on a cache hit), render time and the request id to quote to support. Long outputs stream: save() and iter_bytes() never hold a whole clip in memory.

Change the page before capture

rw.screenshot(
    html="<div class='chat-widget'>Chat</div><details id='details'><summary id='show-more'>Pricing</summary><p>Expanded pricing</p></details>",
    css=".chat-widget { display: none !important; }",
    script="document.querySelector('#show-more').textContent = 'Show pricing';",
    actions=[
        {"type": "click", "selector": "#show-more"},
        {"type": "wait_for_selector", "selector": "#details[open]"},
    ],
).save("expanded.png")

The same options work with rw.pdf() and URL input. After normal load/waits, Ironfang Render applies CSS, awaits the script, then executes actions in order before settling and capture. JavaScript runs in the target page context as an async function body; use await or return a promise for asynchronous work. It has a five-second limit (or the remaining render timeout, if shorter).

CSS is limited to 64 KiB of UTF-8, script to 16 KiB, and actions to 20. Actions are click, hover, wait_for_selector (presence), and delay with duration_ms; combined delays may total at most 10,000 ms. Selectors are limited to 1,024 UTF-8 bytes and share the render timeout. Invalid input returns bad_request; script/action execution errors return sanitized render_failed messages. A screenshot cache hit does not re-execute controls; use no_cache for fresh execution. Full reference.

Durable jobs

job = rw.submit_job("pdf", {"html": invoice_html, "paper_format": "a4"}, idempotency_key=f"invoice-{invoice.id}")
done = rw.wait_for_job(job["id"])
if done["status"] == "succeeded":
    rw.job_result(job["id"]).save(f"invoice-{invoice.id}.pdf")

Verifying a webhook

Run the check over the raw request body, before parsing it.

from ironfang_render import verify_webhook

ok = verify_webhook(
    secret=os.environ["RENDER_WEBHOOK_SECRET"],
    timestamp=request.headers["Renderwolf-Timestamp"],
    signature=request.headers["Renderwolf-Signature"],
    payload=request.get_data(),
)

Errors

Failures raise IronfangRenderError with status, the API's code (quota_exhausted, render_failed, ...) and request_id. Synchronous renders are never retried by the client: a render that timed out may already have been charged, and retrying it blind doubles the bill.

Metadata

Release files for ironfang-render 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ironfang-render 1.0.0
File Size Uploaded Provenance
ironfang_render-1.0.0.tar.gz 13.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for ironfang-render 1.0.0
File Interpreter ABI Platform
ironfang_render-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 23.4 kB

Release files / ironfang_render-1.0.0.tar.gz

Download URL ironfang_render-1.0.0.tar.gz
Size 13.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e3d7c8b25e9dd7d2f2f068867d35d80c3c7103cdd6e30db575b89cb51070c95c
BLAKE2b-256 checksum
How to use checksums
dd00d920f8e200e21aa6e3fd911d9d22e11e9cabc3935749da2bf8ad357e0691
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / ironfang_render-1.0.0-py3-none-any.whl

Download URL ironfang_render-1.0.0-py3-none-any.whl
Size 9.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
194961b66c7d4b03479b3c11e0b2e908410e173aec35574a9d96696a70203279
BLAKE2b-256 checksum
How to use checksums
883e2596f0130301d25918c8a2ed26c54c6822f6e2963fb396705c5ac442099f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.12.14

Security for ironfang-render 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

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