Python SDK
for Peppol E-Invoicing
The official Python SDK for e-invoice.be. Pythonic, clean, and type-hinted for modern Python 3.9+ applications.
pip install e-invoice-apiWhat is e-invoice.be?
e-invoice.be is a recognized Peppol Access Point and SMP operating under the Belgian Peppol Authority (BOSA). We enable businesses worldwide to send and receive electronic invoices via the Peppol network.
Our API lets you send invoices from JSON, upload pre-generated UBL XML, create invoices from PDF files, or integrate via our reseller programme. The Python SDK makes integrating with our API simple and Pythonic.
Instant Delivery
E-invoices delivered instantly via Peppol
Peppol Compliant
Automatic UBL BIS Billing 3.0 conversion
Real-time Validation
Validate invoices before sending
Quick Start
Get up and running in minutes with our Python SDK.
1. Install the SDK
pip install e-invoice-api
2. Usage
import os
from e_invoice_api import EInvoice
client = EInvoice(
api_key=os.environ.get("E_INVOICE_API_KEY"), # This is the default and can be omitted
)
document_response = client.documents.create()
print(document_response.id)Async support
Simply import AsyncEInvoice instead of EInvoice and use await with each API call:
# Simply import AsyncEInvoice instead of EInvoice and use await with each API call:
import asyncio
from e_invoice_api import AsyncEInvoice
client = AsyncEInvoice()
async def main():
document_response = await client.documents.create()
print(document_response.id)
asyncio.run(main())Request & Response types
This library includes type definitions for all request params and response fields:
from e_invoice_api import EInvoice
client = EInvoice()
params: DocumentListParams = {
"limit": 10,
}
page = client.documents.list(params)Features
Type Hints
Full type annotations for better IDE support. Works great with mypy, Pylance, and PyCharm.
Async Support
Native async/await support with AsyncEInvoice client. Perfect for FastAPI, aiohttp, and asyncio applications.
httpx Backend
Uses httpx for both sync and async HTTP requests. Supports aiohttp as an alternative async backend.
Auto-retry with Backoff
Automatic retry logic with exponential backoff for transient failures. Configurable retry strategies.
Auto-pagination
Iterate through paginated results with Python iterators. No manual cursor management needed.
Python 3.9+
Supports Python 3.9, 3.10, 3.11, 3.12, and 3.13. Tested on Linux, macOS, and Windows.
Start integrating today
Get your API key and start sending e-invoices in minutes. Our documentation has everything you need to get started.