Skip to content

LightSpeedPlusOne/invovate-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

invovate

Official Python client for the Invovate invoice 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).

pip install invovate

Quick start

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)

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

License

MIT © Invovate

About

Official Python client for the Invovate invoice API — PDF, JSON & UBL invoices in 11 languages. Zero deps.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages