Official Python SDK for the BeeL API - Fully typed wrapper over OpenAPI-generated code
Project description
BeeL Python SDK
Official Python SDK for the BeeL invoicing API. Fully typed.
Installation
pip install beel-sdk
Quick Start
from beel import BeeL
# The client validates your API key on construction
beel = BeeL('beel_sk_live_...')
# List invoices
invoices = beel.invoices.list()
# Get a specific invoice
invoice = beel.invoices.get('550e8400-e29b-41d4-a716-446655440000')
Usage
Invoices
# List with filters
invoices = beel.invoices.list(page=1, limit=20, status='paid')
# Create
from beel_generated.models import CreateInvoiceRequest, CreateInvoiceRequestLinesInner
invoice = beel.invoices.create(CreateInvoiceRequest(
customer_id='uuid',
issue_date='2026-03-10',
lines=[CreateInvoiceRequestLinesInner(
description='Service',
quantity=1,
unit_price=100
)]
))
# Issue, send, mark paid
beel.invoices.issue('invoice-id')
beel.invoices.send_email('invoice-id', SendEmailRequest(to='client@example.com'))
beel.invoices.mark_paid('invoice-id', MarkInvoicePaidRequest(payment_date='2026-03-10'))
# Download PDF
pdf = beel.invoices.download_pdf('invoice-id')
Customers
customers = beel.customers.list()
created = beel.customers.create(CreateCustomerRequest(name='ACME', nif='B12345678'))
beel.customers.update('id', UpdateCustomerRequest(email='new@acme.com'))
beel.customers.delete('id')
Products
products = beel.products.list()
results = beel.products.search(q='hosting')
Series
series = beel.series.list()
beel.series.set_default('series-id')
Configuration
tax = beel.config.get_tax_configuration()
vf = beel.config.get_verifactu_configuration()
Error Handling
from beel import BeeL, BeeLError
try:
beel = BeeL('invalid_key')
except BeeLError as e:
print(e) # "Invalid API key..."
print(e.status_code) # 401
Configuration
# Production (default)
beel = BeeL('beel_sk_live_...')
# Test environment
beel = BeeL('beel_sk_live_...', base_url='https://test.beel.es/api')
# Skip validation
beel = BeeL('beel_sk_live_...', skip_validation=True)
# Context manager
with BeeL('beel_sk_live_...') as beel:
invoices = beel.invoices.list()
Requirements
- Python 3.9+
Links
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
beel_sdk-1.0.0.tar.gz
(141.8 kB
view details)
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
beel_sdk-1.0.0-py3-none-any.whl
(488.9 kB
view details)
File details
Details for the file beel_sdk-1.0.0.tar.gz.
File metadata
- Download URL: beel_sdk-1.0.0.tar.gz
- Upload date:
- Size: 141.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1cf33ca9a101580a8662ccb5d310dc33adc6f940147c8a72ee46d741cc02383e
|
|
| MD5 |
90b3a22f31e1dbd226d757b49341690e
|
|
| BLAKE2b-256 |
14020ba97dcc95caa9c5cf19b7b678daa8ac7241296a161d407917a1d06586dd
|
File details
Details for the file beel_sdk-1.0.0-py3-none-any.whl.
File metadata
- Download URL: beel_sdk-1.0.0-py3-none-any.whl
- Upload date:
- Size: 488.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b4aec828c0f6aa09a82429a50b2e8c184f627eaa18e278db59de8423ca557b1
|
|
| MD5 |
78fd6d8dee98a50d347b481a06c266e6
|
|
| BLAKE2b-256 |
9d6f742ebba80654e70759fe737a5563a217ab2c9e89c37b79826239c855e587
|