Metadata-Version: 2.4
Name: issabel_client
Version: 0.1.0
Summary: A simple Python Client for the Issabel PBX API
Author-email: Tulio Amancio <root@tsuriu.com>
License: MIT
Project-URL: Homepage, https://github.com/tsuriu/issabel_client
Project-URL: Repository, https://github.com/tsuriu/issabel_client
Project-URL: Issues, https://github.com/tsuriu/issabel_client/issues
Keywords: issabel,pbx,api,client,python-client,asterisk,telephony
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Communications :: Telephony
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.25.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: build>=1.0.0; extra == "dev"
Requires-Dist: twine>=4.0.0; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: flake8>=6.0.0; extra == "dev"
Dynamic: license-file

[![PyPI version](https://img.shields.io/pypi/v/issabel_client.svg)](https://pypi.org/project/issabel_client/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Python Versions](https://img.shields.io/pypi/pyversions/issabel_client.svg)](https://pypi.org/project/issabel_client/)

A simple and functional Python Client to consume the Issabel PBX API. This Client provides a highly dynamic interface that automatically supports all available PBX resources.

## Features

- **Dynamic method generation**: Automatically supports all 40+ PBX resources (Extensions, Trunks, Queues, IVR, etc.).
- **Automatic token renewal**: Handles expired tokens seamlessly using the refresh token.
- **Full CRUD support**: Effortlessly list, create, update, and delete any PBX resource.
- **Configurable SSL**: Supports secure environments with optional certificate verification.
- **Resource Reloading**: Optionally trigger a PBX configuration reload after changes.

## Installation

```bash
pip install issabel_client
```

Or install from source for development:

```bash
git clone https://github.com/tsuriu/issabel_client.git
cd issabel_client
pip install -e .
```

## Quick Start

```python
from issabel_client import IssabelClient

# Initialize the client
client = IssabelClient("your-pbx-ip", use_ssl=False)

# Authenticate
client.authenticate("admin", "yourpassword")

# List all extensions
extensions = client.get_extensions()
print(extensions)

# Create a new extension
new_ext = client.create_extensions({
    "name": "John Doe",
    "extension": "2000",
    "secret": "pswd123"
})
```

## Documentation

For detailed usage instructions, advanced configuration, and a full list of supported resources, please see our [Documentation](docs/documentation.md).

## Examples

Check the `examples/` directory for ready-to-use scripts:
- [example_usage.py](examples/example_usage.py)

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.
