-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started
Christian KASSE edited this page Apr 2, 2026
·
2 revisions
# pip
pip install essabu
# poetry
poetry add essabu
# pipenv
pipenv install essabuThe SDK requires an API key and a tenant ID. You can provide them explicitly or via environment variables.
from essabu import Essabu
client = Essabu(
api_key="esa_live_your_api_key",
tenant_id="your-tenant-id",
)export ESSABU_API_KEY=esa_live_your_api_key
export ESSABU_TENANT_ID=your-tenant-idfrom essabu import Essabu
client = Essabu() # reads from environment automatically| Parameter | Env Variable | Default | Description |
|---|---|---|---|
api_key |
ESSABU_API_KEY |
-- | Your API key (required) |
tenant_id |
ESSABU_TENANT_ID |
-- | Your tenant ID (required) |
base_url |
ESSABU_BASE_URL |
https://api.essabu.com |
API base URL |
timeout |
ESSABU_TIMEOUT |
30.0 |
Request timeout (seconds) |
max_retries |
ESSABU_MAX_RETRIES |
3 |
Max retry attempts |
from essabu import Essabu
client = Essabu(api_key="esa_live_xxx", tenant_id="tenant-id")
# Create a resource
employee = client.hr.employees.create(
first_name="Jean",
last_name="Mukendi",
email="jean@example.com",
)
# List with pagination
page = client.hr.employees.list(page=1, page_size=25)
print(f"Total: {page.total}")
# Retrieve by ID
emp = client.hr.employees.retrieve("employee-uuid")
# Update
client.hr.employees.update("employee-uuid", position_id="new-position")
# Delete
client.hr.employees.delete("employee-uuid")
# Always close when done
client.close()The client supports the context manager protocol for automatic cleanup:
with Essabu(api_key="esa_live_xxx", tenant_id="tenant-id") as client:
employees = client.hr.employees.list()
# client is automatically closed when the block exits| Module | Accessor | Description |
|---|---|---|
| HR | client.hr |
Employees, contracts, leaves, payroll |
| Accounting | client.accounting |
Accounts, invoices, payments, wallets |
| Identity | client.identity |
Auth, users, roles, tenants |
| Trade | client.trade |
CRM, customers, opportunities, orders |
| Payment | client.payment |
Payment intents, loans, subscriptions |
| E-Invoice | client.einvoice |
Electronic invoicing, compliance |
| Project | client.project |
Projects, tasks, milestones |
| Asset | client.asset |
Fixed assets, vehicles, depreciation |
All modules are lazy-loaded -- they are only initialized when you first access them.
- Configuration -- Advanced configuration
- Authentication -- API key management
- Error Handling -- Handle API errors gracefully
- Pagination -- Navigate large result sets
Getting Started
Core Concepts
Modules
Advanced