Unofficial Python SDK for the Pennylane API — the French accounting and invoicing platform
Project description
pennylane-sdk
The unofficial Python SDK for the Pennylane API, the French accounting and invoicing platform.
Documentation | API coverage: 213/213 operations
- Complete: every operation of the Company API v2 (165) and the Firm API v1 (48), in sync and async, audited against the official OpenAPI specs in CI.
- Typed: Pydantic models everywhere; monetary amounts are
Decimal, never floats. - Safe for accounting: the API has no idempotency, so POST is never retried after a server error. No duplicate invoices from a network hiccup.
- Rate-limit proof: built-in client-side throttling to the official limits, plus
retry-afteraware retries on 429. - Effortless pagination: iterate a list call, the SDK fetches the pages.
Not affiliated with Pennylane SAS. Unrelated to the PennyLane quantum computing framework (which owns
pennylaneon PyPI; this package ispennylane-sdk).
Install
pip install pennylane-sdk
Python 3.10+.
Quickstart
Create an API token in Pennylane (Settings > Connectivity > Developers), then:
from pennylane_sdk import Pennylane, filters
client = Pennylane() # reads PENNYLANE_API_TOKEN
# List and filter, with transparent pagination
for invoice in client.customer_invoices.list(
filter=[filters.gte("date", "2026-01-01")],
sort="-date",
):
print(invoice.invoice_number, invoice.currency_amount)
# Create, finalize, send
invoice = client.customer_invoices.create(
customer_id=123,
date="2026-07-08",
deadline="2026-08-07",
invoice_lines=[{"product_id": 45, "quantity": "2"}],
)
client.customer_invoices.finalize(invoice.id)
client.customer_invoices.send_by_email(invoice.id)
Async, same surface:
from pennylane_sdk import AsyncPennylane
async with AsyncPennylane() as client:
page = await client.customer_invoices.list(limit=100)
async for invoice in page:
...
Accounting firms, across the whole portfolio:
from pennylane_sdk import PennylaneFirm
firm = PennylaneFirm() # reads PENNYLANE_FIRM_API_TOKEN
for company in firm.companies.list():
for row in firm.trial_balance.list(
company.id, period_start="2026-01-01", period_end="2026-06-30"
):
...
French e-invoicing (2026 reform), Pennylane being an accredited Plateforme Agréée:
client.customer_invoices.send_to_pa(invoice.id) # emit through the PA
client.supplier_invoices.import_e_invoice(file="factur-x.pdf") # ingest Factur-X/UBL/CII
Complete API coverage
| API | Operations | Resources |
|---|---|---|
| Company v2 | 165/165 | customer and supplier invoices, quotes, customers, products, billing subscriptions, banking and reconciliation, journals, ledger entries, lettering, trial balance, analytics, FEC/GL/AGL exports, SEPA/GoCardless/Pro mandates, e-invoicing, changelogs, webhooks |
| Firm v1 | 48/48 | client portfolio, accounting, DMS, exports, invoicing (read), banking, analytics, changelogs |
Coverage is not a promise: scripts/check_coverage.py verifies in CI that every operation in the vendored official OpenAPI specs exists in both the sync and async clients.
Learn more
- Getting started
- Guides: authentication, pagination and filtering, errors and retries, invoicing lifecycle, e-invoicing 2026, accounting, Firm API, webhooks, OAuth apps
- API reference
- Examples
- Contributing
License
MIT. Build whatever you want with it.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pennylane_sdk-0.1.0.tar.gz.
File metadata
- Download URL: pennylane_sdk-0.1.0.tar.gz
- Upload date:
- Size: 582.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae620fcf0167e254c439e3e9fe5861be6ffd4fe1bbed619ad9a4a1c5ec69dbed
|
|
| MD5 |
8d93172dea5d7434a22f2516991e5212
|
|
| BLAKE2b-256 |
204d309f6161cfdbfb103cc2814af2628c9b7d093ee647bedf8f6f05544c2df0
|
Provenance
The following attestation bundles were made for pennylane_sdk-0.1.0.tar.gz:
Publisher:
release.yml on GoatAndCow7/pennylane-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pennylane_sdk-0.1.0.tar.gz -
Subject digest:
ae620fcf0167e254c439e3e9fe5861be6ffd4fe1bbed619ad9a4a1c5ec69dbed - Sigstore transparency entry: 2120925278
- Sigstore integration time:
-
Permalink:
GoatAndCow7/pennylane-sdk@c28f52fce31bbab3ee273002bfb6c8758e8a0d02 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/GoatAndCow7
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c28f52fce31bbab3ee273002bfb6c8758e8a0d02 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pennylane_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pennylane_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 117.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b6b2fd15a2c9d79543be7139e278f0d6a1f49887e31aeef9010fae1b070aa0f
|
|
| MD5 |
977ca78ba9169b8e20f0d71b95dadba9
|
|
| BLAKE2b-256 |
d45cc2ee2ca54624efc8b35482b1a3d0200eda8ae428d1b6dedc221f2641c71b
|
Provenance
The following attestation bundles were made for pennylane_sdk-0.1.0-py3-none-any.whl:
Publisher:
release.yml on GoatAndCow7/pennylane-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pennylane_sdk-0.1.0-py3-none-any.whl -
Subject digest:
1b6b2fd15a2c9d79543be7139e278f0d6a1f49887e31aeef9010fae1b070aa0f - Sigstore transparency entry: 2120925393
- Sigstore integration time:
-
Permalink:
GoatAndCow7/pennylane-sdk@c28f52fce31bbab3ee273002bfb6c8758e8a0d02 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/GoatAndCow7
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c28f52fce31bbab3ee273002bfb6c8758e8a0d02 -
Trigger Event:
push
-
Statement type: