A Python client for the Issabel PBX REST API (pbxapi). Supports dynamic CRUD for all 40+ resources, batch provisioning with a single final reload, and a full Asterisk Manager Interface (AMI) wrapper.
Features
- Dynamic method generation — Automatic CRUD for all PBX resources (
get_,create_,update_,delete_). - Batch provisioning —
with client.batch():runs N write operations with zero per-call reloads; onemanager/reloadfires automatically at the end. - AMI wrapper (
client.manager) — All 18 Asterisk Manager actions:originate,queuestatus,dbget,dbput,hangup,reload, and more. - Automatic token renewal — Detects HTTP 401 and legacy
{"status": "expired"}responses and renews transparently. - Read-only guards —
NotImplementedErrorraised client-side for write attempts on read-only resources. - Configurable timeout — All HTTP calls share a single
timeoutsetting. - Context manager —
with IssabelClient(...) as client:closes the session on exit. - SSL support — Configurable certificate verification (self-signed certs common on PBX appliances).
Installation
pip install issabel-sdk
Or from source:
git clone https://gitlab.com/libandpackages/issabel-sdk.git
cd issabel-sdk
pip install -e .[dev]
Quick Start
from issabel_client import IssabelClient
with IssabelClient("your-pbx-ip", use_ssl=True, verify_ssl=False) as client:
client.authenticate("admin", "yourpassword")
# List all extensions
extensions = client.get_extensions()
# Create one with immediate reload (default)
client.create_extensions({"extension": "2000", "name": "John Doe", "secret": "pswd123"})
# Batch provisioning — single reload at the end
with client.batch():
for ext in range(3001, 3100):
client.create_extensions({"extension": str(ext), "name": f"User {ext}", "secret": "s3cr3t"})
# ↑ Asterisk reloaded exactly once here
# AMI: originate a call
client.manager.originate(channel="SIP/1001", extension="1002", context="from-internal", priority=1)
# AMI: reload Asterisk manually
client.manager.reload()
Documentation
Full usage guide, payload schemas, and the complete resource catalogue are in docs/documentation.md.
Examples
Ready-to-run scripts are in the examples/ directory:
Contributing
Pull Requests are welcome at gitlab.com/libandpackages/issabel-sdk. Please run pytest and flake8 before submitting.
Resource Capabilities
| Category | Resources |
|---|---|
| Full CRUD | announcements, blacklist, bosssecretary, callback, callflow, cidlookup, classofservice, conferences, customdestinations, customextensions, dahdichanneldids, dialplaninjection, disa, dynamicroutes, extensions, inboundroutes, ivr, languages, mailboxes, miscapplications, miscdestinations, musiconhold, outboundroutes, paging, parkinglots, pinsets, queuepriorities, queues, recordingrules, recordings, ringgroups, setcallerid, timeconditions, timegroups, trunks, vmblast, writequeuelog |
| GET + PUT only | classofserviceadmin, routecongestionmessages |
| Read-only | alldestinations, allextensions, featurecodes, modules, systemrecordings |
| AMI wrapper | client.manager.originate, .queuestatus, .dbget, .dbput, .dbdel, .reload, .hangup, and 11 more |
License
MIT — see LICENSE.
Metadata
Release files for issabel-sdk 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| issabel_sdk-0.2.0.tar.gz | 15.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| issabel_sdk-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 26.5 kB
Release files / issabel_sdk-0.2.0.tar.gz
| Download URL | issabel_sdk-0.2.0.tar.gz |
|---|---|
| Size | 15.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fff9948ba27f87039de68a4d62548c5b1c9031ae17e68052d7f99aa3d72e966f
|
|
BLAKE2b-256 checksum How to use checksums |
6ccb263c5553cb73673c42e0be4ec2f7982a99dea90f7da21eac07bab9afd600
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|
Release files / issabel_sdk-0.2.0-py3-none-any.whl
| Download URL | issabel_sdk-0.2.0-py3-none-any.whl |
|---|---|
| Size | 11.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
14690dfc07a8f26898cb07e89cb8a7dd436ac3739a8b1d15276049e476bdb617
|
|
BLAKE2b-256 checksum How to use checksums |
e0eb15b035d2ea5ccd902221f7622ee214dbb9e3c05ad4a1c1b41d3880aaf441
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|