Skip to main content

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.

🇫🇷 Version française

CI PyPI Python License: MIT

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-after aware 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 pennylane on PyPI; this package is pennylane-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

License

MIT. Build whatever you want with it.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pennylane_sdk-0.1.0.tar.gz (582.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pennylane_sdk-0.1.0-py3-none-any.whl (117.7 kB view details)

Uploaded Python 3

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

Hashes for pennylane_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ae620fcf0167e254c439e3e9fe5861be6ffd4fe1bbed619ad9a4a1c5ec69dbed
MD5 8d93172dea5d7434a22f2516991e5212
BLAKE2b-256 204d309f6161cfdbfb103cc2814af2628c9b7d093ee647bedf8f6f05544c2df0

See more details on using hashes here.

Provenance

The following attestation bundles were made for pennylane_sdk-0.1.0.tar.gz:

Publisher: release.yml on GoatAndCow7/pennylane-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for pennylane_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1b6b2fd15a2c9d79543be7139e278f0d6a1f49887e31aeef9010fae1b070aa0f
MD5 977ca78ba9169b8e20f0d71b95dadba9
BLAKE2b-256 d45cc2ee2ca54624efc8b35482b1a3d0200eda8ae428d1b6dedc221f2641c71b

See more details on using hashes here.

Provenance

The following attestation bundles were made for pennylane_sdk-0.1.0-py3-none-any.whl:

Publisher: release.yml on GoatAndCow7/pennylane-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page