Skip to main content

A Python wrapper for the WeFact API

Project description

WeFact Python Wrapper

PyPI version Tests codecov Python Version

An unofficial, batteries-included Python client for the WeFact API. Pragmatic, typed where it counts, and intentionally minimal on magic.

What is WeFact? WeFact is a Dutch invoicing and accounting platform. Create invoices and quotes, process supplier invoices, and maintain real-time insight into your administration.

Maintained by zzinnovate. Open source, community-friendly, and actively maintained. Not affiliated with WeFact. For the upstream API, see the official WeFact API documentation.

Documentation

📖 View Full Documentation →

Complete guides and API reference:

Requirements

  • Python 3.11+

Install

# Basic installation (library only)
pip install wefact-python

# With CLI testing tool
pip install "wefact-python[cli]"

# For development (includes CLI, testing, and docs)
pip install -e ".[all]"

Quick start

import os
from wefact import WeFact

client = WeFact(api_key=os.getenv('WEFACT_API_KEY'))

# List your latest invoices
result = client.invoices.list(limit=25)
print(result)

Features

  • Minimal dependencies - Only requests for HTTP calls
  • Type hints - Better IDE support and fewer runtime errors
  • Direct API mapping - Mirrors WeFact's controller/action structure
  • Error handling - Clear exceptions for common failure modes
  • Attachment support - Base64 encoding/decoding utilities built-in
  • Production-tested - Used by zzinnovate in client projects

Resources

Complete coverage of all 13 WeFact API resources:

Invoices • Credit Invoices • Debtors • Products • Creditors • Groups • Subscriptions • Quotes • Interactions • Tasks • Transactions • Cost Categories • Settings

Common operations

# Show a debtor
debtor = client.debtors.show(Identifier=5)

# Create an invoice
invoice = client.invoices.create(
    DebtorCode="DB10000",
    InvoiceLines=[
        {
            "Number": 1,
            "ProductCode": "P0001",
            "Description": "Service",
            "PriceExcl": 100
        }
    ],
)

# Mark invoice as paid
client.invoices.mark_as_paid(Identifier=invoice["invoice"]["Identifier"])

Contributing

Contributions are welcome. See CONTRIBUTING.md for development setup, testing, and workflow guidelines.

Security

See SECURITY.md for reporting vulnerabilities and best practices.

Credits

License

MIT. See LICENSE.

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

wefact_python-1.0.3.tar.gz (64.2 kB view details)

Uploaded Source

Built Distribution

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

wefact_python-1.0.3-py3-none-any.whl (70.0 kB view details)

Uploaded Python 3

File details

Details for the file wefact_python-1.0.3.tar.gz.

File metadata

  • Download URL: wefact_python-1.0.3.tar.gz
  • Upload date:
  • Size: 64.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for wefact_python-1.0.3.tar.gz
Algorithm Hash digest
SHA256 23e31d7c32d1782567f45202ca749ca83fd9c1e113d6e448bf29d4457e13ba21
MD5 c9671a31f477dba09ba3cd23799e7059
BLAKE2b-256 1cbb654a3ffc3c94f935bfd8f18501e36b8fb04c93199853d1aaf1202df30663

See more details on using hashes here.

Provenance

The following attestation bundles were made for wefact_python-1.0.3.tar.gz:

Publisher: publish.yml on zzinnovate/wefact-python

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

File details

Details for the file wefact_python-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: wefact_python-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 70.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for wefact_python-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 131e36e71b75e1e1d810c5e100d2d531d20006e7ebce5ebd83f3c1f7767ae06d
MD5 651a40c989fe93718282ccf034dd8bba
BLAKE2b-256 d3ba709e6f9062a61bdc04cdaace429966f1d27920fe1b4a58ecf55e7d3a5e09

See more details on using hashes here.

Provenance

The following attestation bundles were made for wefact_python-1.0.3-py3-none-any.whl:

Publisher: publish.yml on zzinnovate/wefact-python

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