Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:

- name: Test with pytest
run: |
pytest --cov=src/devo_global_comms_python --cov-report=xml --cov-report=html
pytest --cov=src/devhub_python --cov-report=xml --cov-report=html

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
Expand Down
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Devo Global Communications Python SDK
# DevHub Python SDK

[![PyPI version](https://badge.fury.io/py/devo-global-comms-python.svg)](https://badge.fury.io/py/devo-global-comms-python)
[![Python Support](https://img.shields.io/pypi/pyversions/devo-global-comms-python.svg)](https://pypi.org/project/devo-global-comms-python/)
[![Documentation](https://img.shields.io/badge/docs-github%20pages-blue)](https://devotel.github.io/devo-global-comms-python/)
[![PyPI version](https://badge.fury.io/py/devhub-python.svg)](https://badge.fury.io/py/devhub-python)
[![Python Support](https://img.shields.io/pypi/pyversions/devhub-python.svg)](https://pypi.org/project/devhub-python/)
[![Documentation](https://img.shields.io/badge/docs-github%20pages-blue)](https://devotel.github.io/devhub-python/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

A Python SDK for the Devo Global Communications API, supporting SMS, Email, WhatsApp, RCS, and Contact management.
A Python SDK for the DevHub API, supporting SMS, Email, WhatsApp, RCS, and Contact management.

## Features

Expand All @@ -20,13 +20,13 @@ A Python SDK for the Devo Global Communications API, supporting SMS, Email, What
## Installation

```bash
pip install devo-global-comms-python
pip install devhub-python
```

## Quick Start

```python
from devo_global_comms_python import DevoClient
from devhub_python import DevoClient

# Initialize the client
client = DevoClient(api_key="your-api-key")
Expand Down Expand Up @@ -61,7 +61,7 @@ print(f"WhatsApp message sent with ID: {whatsapp_response.id}")
The SDK uses API key authentication:

```python
from devo_global_comms_python import DevoClient
from devhub_python import DevoClient

client = DevoClient(api_key="your-api-key")
```
Expand All @@ -83,7 +83,7 @@ You can provide your own `requests.Session` for advanced configuration:

```python
import requests
from devo_global_comms_python import DevoClient
from devhub_python import DevoClient

session = requests.Session()
session.proxies = {"https": "https://proxy.example.com:8080"}
Expand Down Expand Up @@ -119,8 +119,8 @@ print(f"Status: {sms_response.status}")

```bash
# Clone the repository
git clone https://github.com/devotel/devo-global-comms-python.git
cd devo-global-comms-python
git clone https://github.com/devotel/devhub-python.git
cd devhub-python

# Install development dependencies
pip install -e ".[dev]"
Expand All @@ -136,7 +136,7 @@ pre-commit install
pytest

# Run with coverage
pytest --cov=src/devo_global_comms_python
pytest --cov=src/devhub_python

# Run specific test file
pytest tests/test_sms.py
Expand Down Expand Up @@ -171,8 +171,8 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file

## Support

- **Documentation**: [https://devotel.github.io/devo-global-comms-python/](https://devotel.github.io/devo-global-comms-python/)
- **Issues**: [GitHub Issues](https://github.com/devotel/devo-global-comms-python/issues)
- **Documentation**: [https://devotel.github.io/devhub-python/](https://devotel.github.io/devhub-python/)
- **Issues**: [GitHub Issues](https://github.com/devotel/devhub-python/issues)
- **Email**: [support@devotel.io](mailto:support@devotel.io)

## Changelog
Expand Down
16 changes: 8 additions & 8 deletions docs/error_handling.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Error Handling

The Devo SDK provides comprehensive error handling to help you build robust applications.
The DevHub SDK provides comprehensive error handling to help you build robust applications.

## Exception Types

The SDK uses a hierarchy of exceptions for different error scenarios:

```python
from devo_global_comms_python.exceptions import DevoException
from devhub_python.exceptions import DevoException
```

All SDK exceptions inherit from `DevoException`, making it easy to catch any SDK-related error.
Expand All @@ -17,7 +17,7 @@ All SDK exceptions inherit from `DevoException`, making it easy to catch any SDK
### Simple Try-Catch

```python
from devo_global_comms_python.exceptions import DevoException
from devhub_python.exceptions import DevoException

try:
sms_response = client.sms.send_sms(
Expand Down Expand Up @@ -81,7 +81,7 @@ except DevoException as e:
### Missing Required Fields

```python
from devo_global_comms_python.models.contacts import CreateContactDto
from devhub_python.models.contacts import CreateContactDto

try:
# Missing required data
Expand All @@ -97,7 +97,7 @@ except DevoException as e:

```python
import time
from devo_global_comms_python.exceptions import DevoException
from devhub_python.exceptions import DevoException

def send_with_retry(client, recipient, message, max_retries=3):
for attempt in range(max_retries):
Expand All @@ -122,7 +122,7 @@ def send_with_retry(client, recipient, message, max_retries=3):
```python
import time
import random
from devo_global_comms_python.exceptions import DevoException
from devhub_python.exceptions import DevoException

def send_with_backoff(client, recipient, message, max_retries=3):
for attempt in range(max_retries):
Expand All @@ -148,7 +148,7 @@ def send_with_backoff(client, recipient, message, max_retries=3):
### Fallback to Alternative Channels

```python
from devo_global_comms_python.exceptions import DevoException
from devhub_python.exceptions import DevoException

def send_message_with_fallback(client, recipient, message):
"""Try SMS first, fallback to WhatsApp if SMS fails."""
Expand Down Expand Up @@ -191,7 +191,7 @@ except DevoException as e:

```python
import logging
from devo_global_comms_python.exceptions import DevoException
from devhub_python.exceptions import DevoException

# Configure logging
logging.basicConfig(level=logging.INFO)
Expand Down
18 changes: 9 additions & 9 deletions docs/examples.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Examples

This page contains practical examples to help you get started with the Devo SDK.
This page contains practical examples to help you get started with the DevHub SDK.

## Complete Working Examples

Expand All @@ -18,12 +18,12 @@ For detailed, working examples of each feature, check out the `examples/` direct
### Send the Same Message Across All Channels

```python
from devo_global_comms_python import DevoClient
from devo_global_comms_python.exceptions import DevoException
from devhub_python import DevoClient
from devhub_python.exceptions import DevoException

client = DevoClient(api_key="your-api-key")
recipient = "+1234567890"
message = "Hello from Devo SDK!"
message = "Hello from DevHub SDK!"

# Send via SMS
try:
Expand Down Expand Up @@ -62,8 +62,8 @@ except DevoException as e:
### Complete Contact Lifecycle

```python
from devo_global_comms_python.models.contacts import CreateContactDto, UpdateContactDto
from devo_global_comms_python.models.contact_groups import CreateContactsGroupDto
from devhub_python.models.contacts import CreateContactDto, UpdateContactDto
from devhub_python.models.contact_groups import CreateContactsGroupDto

# 1. Create a contact
contact_data = CreateContactDto(
Expand All @@ -87,7 +87,7 @@ group = client.services.contact_groups.create(group_data)
print(f"Created group: {group.id}")

# 3. Add contact to group
from devo_global_comms_python.models.contacts import AssignToContactsGroupDto
from devhub_python.models.contacts import AssignToContactsGroupDto

assignment = AssignToContactsGroupDto(
contact_ids=[contact.id],
Expand All @@ -112,7 +112,7 @@ print(f"Welcome SMS sent: {welcome_sms.id}")

```python
import time
from devo_global_comms_python.exceptions import DevoException
from devhub_python.exceptions import DevoException

def send_message_with_retry(client, recipient, message, max_retries=3):
"""Send a message with retry logic."""
Expand Down Expand Up @@ -158,7 +158,7 @@ response = send_message_with_retry(client, "+1234567890", "Important message!")

```python
import os
from devo_global_comms_python import DevoClient
from devhub_python import DevoClient

# Set environment variables
# export DEVO_API_KEY="your-api-key"
Expand Down
12 changes: 6 additions & 6 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Devo Global Communications Python SDK
# DevHub Python SDK

A Python SDK for the Devo Global Communications API, supporting SMS, Email, WhatsApp, RCS, and Contact management.
A Python SDK for the DevHub API, supporting SMS, Email, WhatsApp, RCS, and Contact management.

## Features

Expand All @@ -13,13 +13,13 @@ A Python SDK for the Devo Global Communications API, supporting SMS, Email, What
## Installation

```bash
pip install devo-global-comms-python
pip install devhub-python
```

## Quick Example

```python
from devo_global_comms_python import DevoClient
from devhub_python import DevoClient

# Initialize the client
client = DevoClient(api_key="your-api-key")
Expand All @@ -39,7 +39,7 @@ Continue to the [Quick Start](quickstart.md) guide to learn how to use the SDK.

## SDK Overview

The Devo SDK is organized into logical resources:
The DevHub SDK is organized into logical resources:

| Resource | Purpose | Example Usage |
|----------|---------|---------------|
Expand All @@ -52,5 +52,5 @@ The Devo SDK is organized into logical resources:

## Support

- **Issues**: [GitHub Issues](https://github.com/devotel/devo-global-comms-python/issues)
- **Issues**: [GitHub Issues](https://github.com/devotel/devhub-python/issues)
- **Email**: [support@devotel.io](mailto:support@devotel.io)
12 changes: 6 additions & 6 deletions docs/quickstart.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# Quick Start

This guide will help you get started with the Devo Global Communications Python SDK.
This guide will help you get started with the DevHub Python SDK.

## Installation

Install the SDK using pip:

```bash
pip install devo-global-comms-python
pip install devhub-python
```

## Authentication

Initialize the client with your API key:

```python
from devo_global_comms_python import DevoClient
from devhub_python import DevoClient

client = DevoClient(api_key="your-api-key")
```
Expand All @@ -30,7 +30,7 @@ client = DevoClient(api_key="your-api-key")
```python
sms_response = client.sms.send_sms(
recipient="+1234567890",
message="Hello from Devo SDK!",
message="Hello from DevHub SDK!",
sender="+1987654321"
)
print(f"SMS sent with ID: {sms_response.id}")
Expand All @@ -42,7 +42,7 @@ print(f"SMS sent with ID: {sms_response.id}")
email_response = client.email.send_email(
recipient="user@example.com",
subject="Welcome!",
content="Thank you for using Devo SDK.",
content="Thank you for using DevHub SDK.",
sender_email="welcome@example.com"
)
print(f"Email sent with ID: {email_response.id}")
Expand All @@ -63,7 +63,7 @@ print(f"WhatsApp message sent with ID: {whatsapp_response.id}")
Always wrap your API calls in try-catch blocks:

```python
from devo_global_comms_python.exceptions import DevoException
from devhub_python.exceptions import DevoException

try:
sms_response = client.sms.send_sms(
Expand Down
8 changes: 4 additions & 4 deletions docs/sdk/contact_groups.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The Contact Groups resource allows you to organize contacts into groups for easi
## Creating Contact Groups

```python
from devo_global_comms_python.models.contact_groups import CreateContactsGroupDto
from devhub_python.models.contact_groups import CreateContactsGroupDto

# Create a contact group
group_data = CreateContactsGroupDto(
Expand Down Expand Up @@ -33,7 +33,7 @@ for group in groups_response.groups:
## Updating Contact Groups

```python
from devo_global_comms_python.models.contact_groups import UpdateContactsGroupDto
from devhub_python.models.contact_groups import UpdateContactsGroupDto

# Update a contact group
update_data = UpdateContactsGroupDto(
Expand Down Expand Up @@ -86,7 +86,7 @@ print(f"Found {search_results.total} groups matching 'VIP'")
## Deleting Contact Groups

```python
from devo_global_comms_python.models.contact_groups import DeleteContactsGroupsDto
from devhub_python.models.contact_groups import DeleteContactsGroupsDto

# Delete contact groups
delete_data = DeleteContactsGroupsDto(
Expand All @@ -101,7 +101,7 @@ print("Contact group deleted successfully")
## Error Handling

```python
from devo_global_comms_python.exceptions import DevoException
from devhub_python.exceptions import DevoException

try:
group = client.services.contact_groups.create(group_data)
Expand Down
Loading