Metadata-Version: 2.4
Name: htpdf
Version: 1.0.0
Summary: Python SDK for the HTPDF API — generate PDFs, screenshots, and more
Project-URL: Homepage, https://htpdf.net
Project-URL: Documentation, https://htpdf.net/docs
Project-URL: Repository, https://github.com/algasid7e/htpdf-python
Author-email: Hass Tech LLC <support@htpdf.net>
License-Expression: MIT
Keywords: api,document,html-to-pdf,pdf,screenshot
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.9
Requires-Dist: httpx>=0.24
Description-Content-Type: text/markdown

# HTPDF Python SDK

Generate PDFs, screenshots, and hosted documents via the [HTPDF API](https://htpdf.net).

## Install

```bash
pip install htpdf
```

## Quick Start

```python
from htpdf import HTPDFClient

client = HTPDFClient("htpdf_live_...")

# HTML to PDF
result = client.html_to_pdf("<h1>Hello World</h1>")
print(result["pdf_id"], result["url"])

# Download
pdf_bytes = client.download(result["pdf_id"])
with open("output.pdf", "wb") as f:
    f.write(pdf_bytes)

# URL to PDF
result = client.url_to_pdf("https://example.com")

# Async PDF (Pro+)
job = client.async_pdf("html", html="<h1>Async</h1>")
completed = client.wait_for_async_job(job["job_id"])

# Document Hosting (Pro+)
doc = client.create_hosted_document(result["pdf_id"], expires_in_hours=24)
print(doc["url"])  # /d/abc12345
```

## License

MIT
