A Python wrapper for the WeFact API
Project description
WeFact Python Wrapper
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
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
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.
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
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 wefact_python-1.0.2.tar.gz.
File metadata
- Download URL: wefact_python-1.0.2.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81bd388bead4c14f8750c845485f81be9984174937d8d319a54289cfddad24e6
|
|
| MD5 |
c580d462c26305143edc00d6819cf8d2
|
|
| BLAKE2b-256 |
373dff63a29de76a5d8d14d88317a71afb5594a56819142ac8f28eb7c55b657f
|
Provenance
The following attestation bundles were made for wefact_python-1.0.2.tar.gz:
Publisher:
publish.yml on zzinnovate/wefact-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
wefact_python-1.0.2.tar.gz -
Subject digest:
81bd388bead4c14f8750c845485f81be9984174937d8d319a54289cfddad24e6 - Sigstore transparency entry: 701976716
- Sigstore integration time:
-
Permalink:
zzinnovate/wefact-python@fcc88ebafe1794f08b1aeef0d62b75c8f08796b2 -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/zzinnovate
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@fcc88ebafe1794f08b1aeef0d62b75c8f08796b2 -
Trigger Event:
release
-
Statement type:
File details
Details for the file wefact_python-1.0.2-py3-none-any.whl.
File metadata
- Download URL: wefact_python-1.0.2-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ba3ba0118526fc6dd617705a147a79ef76890b9c882a4af970f0d1f3579e76e
|
|
| MD5 |
e52bd892e4243441721471ac2d4e2d3b
|
|
| BLAKE2b-256 |
e57e346167ec5ba3bf8261b1a97be28e60bc98e545d5cbfa0c21cf62b1bc79cd
|
Provenance
The following attestation bundles were made for wefact_python-1.0.2-py3-none-any.whl:
Publisher:
publish.yml on zzinnovate/wefact-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
wefact_python-1.0.2-py3-none-any.whl -
Subject digest:
9ba3ba0118526fc6dd617705a147a79ef76890b9c882a4af970f0d1f3579e76e - Sigstore transparency entry: 701976723
- Sigstore integration time:
-
Permalink:
zzinnovate/wefact-python@fcc88ebafe1794f08b1aeef0d62b75c8f08796b2 -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/zzinnovate
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@fcc88ebafe1794f08b1aeef0d62b75c8f08796b2 -
Trigger Event:
release
-
Statement type: