Metadata-Version: 2.4
Name: pdfwright
Version: 0.1.0
Summary: Official Python client for PDFwright — the developer-first PDF API. HTML, URLs, Markdown, and JSON templates in; pixel-perfect PDFs out.
Project-URL: Homepage, https://pdfwright.dev
Project-URL: Documentation, https://pdfwright.dev/docs
Author-email: PDFwright <hello@pdfwright.dev>
License-Expression: MIT
Keywords: html-to-pdf,invoice,markdown-to-pdf,pdf,pdf-api,pdf-generation
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# pdfwright

Official Python client for [PDFwright](https://pdfwright.dev) — the developer-first PDF API.
Zero dependencies (stdlib only), Python 3.9+.

```bash
pip install pdfwright
```

(Package and module are both `pdfwright`.)

```python
from pdfwright import PDFwright

client = PDFwright("pdfw_live_...")  # free key at pdfwright.dev

# HTML → PDF
open("hello.pdf", "wb").write(client.html("<h1>Hello!</h1>", format="Letter"))

# JSON → invoice (totals & tax computed for you)
pdf = client.invoice({
    "brand": {"name": "Acme Studio", "color": "#0f766e"},
    "invoiceNumber": "INV-2043",
    "currency": "USD",
    "to": {"name": "Northwind Traders"},
    "items": [{"description": "Design work", "quantity": 10, "unitPrice": 95}],
    "taxRate": 8.5,
})

# Markdown → styled PDF
client.markdown("# Q2 Report\n\nRevenue grew **12%**.", theme="serif")

# Check your quota
print(client.usage())  # {'plan': ..., 'used': ..., 'remaining': ...}
```

Get a free API key (50 PDFs/month) at [pdfwright.dev](https://pdfwright.dev/#get-key).
Full API reference: [pdfwright.dev/docs](https://pdfwright.dev/docs).

## Publishing (maintainer note)

```bash
cd clients/python
python -m pip install build twine
python -m build
python -m twine upload dist/*   # requires a PyPI account/token
```
