Metadata-Version: 2.4
Name: invovate
Version: 0.1.1
Summary: Official Python SDK for the free, no-signup Invovate invoice API — generate PDF, JSON & UBL 2.1 invoices in 11 languages. Zero dependencies.
Project-URL: Homepage, https://invovate.com/api
Project-URL: Documentation, https://invovate.com/api
Project-URL: Repository, https://github.com/LightSpeedPlusOne/invovate-python
Project-URL: Issues, https://github.com/LightSpeedPlusOne/invovate-python/issues
Project-URL: OpenAPI spec, https://invovate.com/openapi.json
Project-URL: MCP server, https://www.npmjs.com/package/invovate-mcp-server
Project-URL: JavaScript SDK, https://www.npmjs.com/package/invovate
Project-URL: Integrations, https://invovate.com/integrations
Author: Invovate
License: MIT
License-File: LICENSE
Keywords: billing,e-invoicing,invoice,invoice-api,invoice-generator,invoicing,invovate,json-to-pdf,multilingual,no-signup,pdf-invoice,rest-api,ubl,ubl-2.1
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Office/Business :: Financial
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# invovate

Official Python client for the [Invovate invoice API](https://invovate.com/api).
Generate **PDF, JSON, or UBL 2.1** invoices in **11 languages** (incl. Arabic RTL,
Japanese, Hindi, Cyrillic) from one call. **Zero dependencies** (standard library only).

```bash
pip install invovate
```

## Quick start

```python
import os
from invovate import Invovate

# API key is OPTIONAL — JSON totals & PDF hosted-links work without one.
# Free key (inv_…) at https://invovate.com/auth enables direct PDF/UBL bytes.
client = Invovate(api_key=os.environ.get("INVOVATE_API_KEY"))

# 1) Compute totals (no key needed)
totals = client.calculate_totals(
    from_={"name": "Acme LLC"},
    to={"name": "Globex Corp"},
    currency="USD",
    items=[{"description": "Consulting", "quantity": 2, "unit_price": 150, "tax_rate": 10}],
)
print(totals["grand_total"])  # 330

# 2) Get a downloadable PDF link (works without a key)
link = client.create_pdf_link(
    from_={"name": "Acme BV", "tax_id": "NL0012"},
    to={"name": "Client KK"},
    language="nl", currency="EUR", template="modern",
    items=[{"description": "Onderhoud", "quantity": 1, "unit_price": 450, "tax_rate": 21}],
)
print(link["hosted_url"])  # https://invovate.com/api/i/...  (renders the PDF, 7 days)
```

> Note: `from` is a Python keyword, so the SDK uses **`from_`** for the sender party.

## With an API key (direct file bytes)

```python
pdf = client.create_pdf(from_={"name": "Acme"}, to={"name": "Client"},
                        items=[{"description": "Work", "quantity": 1, "unit_price": 100}])
open("invoice.pdf", "wb").write(pdf)

xml = client.create_ubl(from_={"name": "Acme"}, to={"name": "Client"},
                        items=[{"description": "Work", "quantity": 1, "unit_price": 100}])
```

## API

| Method | Returns | Key |
|--------|---------|-----|
| `calculate_totals(...)` | `dict` of totals | no |
| `create_pdf_link(...)` | `{"hosted_url", "invoice"}` | no |
| `create_pdf(...)` | `bytes` (PDF) | yes |
| `create_ubl(...)` | `str` (UBL 2.1 XML) | yes |
| `batch([...])` | batch result (≤ 50) | yes |
| `generate(..., output=, hosted_link=, idempotency_key=)` | low-level | — |

Each method accepts either a full `invoice` dict or the keyword shortcuts
`from_=`, `to=`, `items=` plus any other fields (`currency`, `language`, `template`,
`payment`, `notes`, …). Errors raise `InvovateError` (`.status`, `.code`, `.request_id`).

## Notes
- Languages: `en, nl, de, fr, es, it, pt, ar, ja, ru, hi`. Templates: `classic, modern, bold, minimal, navy`.
- **Not regulated e-invoicing.** UBL is for interoperability/archival — no Peppol/Factur-X/XRechnung/NF-e compliance.

## Links

- **API docs & OpenAPI:** https://invovate.com/api · https://invovate.com/openapi.json
- **MCP server** (for Claude / Cursor AI agents — a separate package): https://www.npmjs.com/package/invovate-mcp-server
- **JavaScript / Node SDK:** https://www.npmjs.com/package/invovate
- **All integrations** (n8n, WordPress, Google Sheets, Postman, RapidAPI): https://invovate.com/integrations
- **Source:** https://github.com/LightSpeedPlusOne/invovate-python · AI-agent guide: https://invovate.com/invoice-api-for-ai-agents

## License
MIT © Invovate
