WeFact Python Wrapper
An unofficial, batteries-included Python client for the WeFact API. Pragmatic, typed where it counts, and intentionally minimal on magic.
WeFact is a Dutch invoicing and accounting platform. Create invoices and quotes, process supplier invoices, and maintain real-time insight into your administration.
Built and maintained by zzinnovate. Not affiliated with WeFact.
Documentation
Complete guides and API reference:
- Getting Started - Installation • Usage • Configuration
- API Reference - Resources • Parameters • Variables (Enums) • Errors
- Guides - Invoice Lifecycle • CLI Testing Tool
- Project - Contributing • Changelog • Security
For the upstream API, see the official WeFact API documentation.
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
requestsfor 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
- Sjoerd Zaalberg van Zelst (zzinnovate)
- All contributors
- Inspired by vormkracht10/wefact-php
License
MIT. See LICENSE.
Metadata
Release files for wefact-python 1.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| wefact_python-1.0.4.tar.gz | 64.1 kB | With provenance | Details for wefact_python-1.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| wefact_python-1.0.4-py3-none-any.whl | Python 3 | none | any | Details for wefact_python-1.0.4-py3-none-any.whl |
Total release size: 134.0 kB
Release files / wefact_python-1.0.4.tar.gz
| Download URL | wefact_python-1.0.4.tar.gz |
|---|---|
| Size | 64.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c5c205fad6a7bddf76ebfc5627cee4cb61debfde51da1b00d49023f7edb11b1d
|
|
BLAKE2b-256 checksum How to use checksums |
4aaeaa0c68a2b74b89c8b0ba4bf04a0b0fd2e0e83ea943cdb430fe352ad8c434
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 15, 2025.
Transparency logRelease files / wefact_python-1.0.4-py3-none-any.whl
| Download URL | wefact_python-1.0.4-py3-none-any.whl |
|---|---|
| Size | 70.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8a63632ecea01472174ecbb0e293ca7b28c73cfbe74fb6df83fbdee446837d2c
|
|
BLAKE2b-256 checksum How to use checksums |
2b9bc54443c52c5098bd30993cac84bae7bff886f6af3f46ecacc6ee1f433df8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 15, 2025.
Transparency logSecurity for wefact-python 1.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for wefact_python-1.0.4.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 15, 2025.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.