rendoc
Official Python SDK for the rendoc PDF generation API.
- Sync and async clients
- Full type hints
- Python 3.9+
Installation
pip install rendoc
Quick start
Sync
from rendoc import Rendoc
client = Rendoc(api_key="rnd_...")
# Generate a PDF from markup
doc = client.documents.generate(
markup="<h1>{{title}}</h1>",
data={"title": "Hello World"},
paper_size="A4",
)
print(doc.download_url)
# Generate from a template
doc = client.documents.generate(template_id="tmpl_123", data={"name": "John"})
# List templates
templates = client.templates.list()
invoices = client.templates.list(category="INVOICE")
# Check usage
usage = client.usage.get()
print(f"{usage.usage.documents}/{usage.usage.limit} documents used")
Async
import asyncio
from rendoc import AsyncRendoc
async def main():
client = AsyncRendoc(api_key="rnd_...")
doc = await client.documents.generate(
markup="<h1>Hi</h1>",
data={},
)
print(doc.download_url)
await client.close()
asyncio.run(main())
Context manager
# Sync
with Rendoc(api_key="rnd_...") as client:
doc = client.documents.generate(markup="<h1>Hi</h1>", data={})
# Async
async with AsyncRendoc(api_key="rnd_...") as client:
doc = await client.documents.generate(markup="<h1>Hi</h1>", data={})
Error handling
from rendoc import Rendoc, AuthenticationError, RateLimitError, RendocError
client = Rendoc(api_key="rnd_...")
try:
doc = client.documents.generate(markup="<h1>Hi</h1>", data={})
except AuthenticationError:
print("Invalid API key")
except RateLimitError:
print("Too many requests — slow down")
except RendocError as e:
print(f"API error: {e.message} (status {e.status_code})")
Custom base URL
client = Rendoc(api_key="rnd_...", base_url="https://custom.rendoc.dev")
Documentation
Full API reference at https://rendoc.dev/docs.
Metadata
Release files for rendoc 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| rendoc-1.0.0.tar.gz | 6.1 kB | Without provenance | Details for rendoc-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rendoc-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for rendoc-1.0.0-py3-none-any.whl |
Total release size: 13.5 kB
Release files / rendoc-1.0.0.tar.gz
| Download URL | rendoc-1.0.0.tar.gz |
|---|---|
| Size | 6.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c22eecdd74ad3db174287133c8e692dde451f68185dc2ee7fe444676defe695b
|
|
BLAKE2b-256 checksum How to use checksums |
5f692e7e5b5312e4c23ecaabe7fc07bf2cd3c221a9f13849001ff9d03f81ea09
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Release files / rendoc-1.0.0-py3-none-any.whl
| Download URL | rendoc-1.0.0-py3-none-any.whl |
|---|---|
| Size | 7.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c5e8b29de3516169de18887ed6e27ea91fbc7afd7f76b65f269d4eb2c7cbf019
|
|
BLAKE2b-256 checksum How to use checksums |
0882d279921220faf430e2f1a69aee1f6d45e360df1585f140c479d19e52b4dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Security for rendoc 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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.