diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cf49012..059f863 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 diff --git a/README.md b/README.md index f072816..01db6d4 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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") @@ -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") ``` @@ -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"} @@ -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]" @@ -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 @@ -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 diff --git a/docs/error_handling.md b/docs/error_handling.md index fc9f608..62e90af 100644 --- a/docs/error_handling.md +++ b/docs/error_handling.md @@ -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. @@ -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( @@ -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 @@ -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): @@ -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): @@ -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.""" @@ -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) diff --git a/docs/examples.md b/docs/examples.md index 744ddfd..7c57721 100644 --- a/docs/examples.md +++ b/docs/examples.md @@ -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 @@ -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: @@ -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( @@ -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], @@ -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.""" @@ -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" diff --git a/docs/index.md b/docs/index.md index 0ac38f3..043a7e8 100644 --- a/docs/index.md +++ b/docs/index.md @@ -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 @@ -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") @@ -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 | |----------|---------|---------------| @@ -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) diff --git a/docs/quickstart.md b/docs/quickstart.md index 2ebe5f2..57c6a68 100644 --- a/docs/quickstart.md +++ b/docs/quickstart.md @@ -1,13 +1,13 @@ # 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 @@ -15,7 +15,7 @@ pip install devo-global-comms-python 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") ``` @@ -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}") @@ -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}") @@ -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( diff --git a/docs/sdk/contact_groups.md b/docs/sdk/contact_groups.md index b31a6c3..dc09745 100644 --- a/docs/sdk/contact_groups.md +++ b/docs/sdk/contact_groups.md @@ -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( @@ -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( @@ -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( @@ -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) diff --git a/docs/sdk/contacts.md b/docs/sdk/contacts.md index beb0b6b..44b8cd0 100644 --- a/docs/sdk/contacts.md +++ b/docs/sdk/contacts.md @@ -5,7 +5,7 @@ The Contacts resource allows you to manage contact information through the servi ## Creating Contacts ```python -from devo_global_comms_python.models.contacts import CreateContactDto +from devhub_python.models.contacts import CreateContactDto # Create a contact contact_data = CreateContactDto( @@ -36,7 +36,7 @@ for contact in contacts_response.contacts: ## Updating Contacts ```python -from devo_global_comms_python.models.contacts import UpdateContactDto +from devhub_python.models.contacts import UpdateContactDto # Update a contact update_data = UpdateContactDto( @@ -67,7 +67,7 @@ print(f"Found {filtered_contacts.total} contacts matching filters") ### Create Custom Field ```python -from devo_global_comms_python.models.contacts import CreateCustomFieldDto +from devhub_python.models.contacts import CreateCustomFieldDto field_data = CreateCustomFieldDto( name="Department", @@ -92,7 +92,7 @@ print(f"Found {custom_fields.total} custom fields") ### Assign to Group ```python -from devo_global_comms_python.models.contacts import AssignToContactsGroupDto +from devhub_python.models.contacts import AssignToContactsGroupDto assignment_data = AssignToContactsGroupDto( contact_ids=[contact.id], @@ -113,7 +113,7 @@ print("Contact unassigned from group") ## Deleting Contacts ```python -from devo_global_comms_python.models.contacts import DeleteContactsDto +from devhub_python.models.contacts import DeleteContactsDto # Delete contacts delete_data = DeleteContactsDto(contact_ids=[contact.id]) @@ -124,7 +124,7 @@ print("Contact deleted successfully") ## Error Handling ```python -from devo_global_comms_python.exceptions import DevoException +from devhub_python.exceptions import DevoException try: contact = client.services.contacts.create(contact_data) diff --git a/docs/sdk/email.md b/docs/sdk/email.md index 8d9b62a..76fb70b 100644 --- a/docs/sdk/email.md +++ b/docs/sdk/email.md @@ -41,7 +41,7 @@ Email methods return response objects with fields like: ## Error Handling ```python -from devo_global_comms_python.exceptions import DevoException +from devhub_python.exceptions import DevoException try: email_response = client.email.send_email( diff --git a/docs/sdk/rcs.md b/docs/sdk/rcs.md index 56e34d7..3d73449 100644 --- a/docs/sdk/rcs.md +++ b/docs/sdk/rcs.md @@ -30,7 +30,7 @@ print(f"Rich card sent with ID: {rich_card.id}") ```python # Using the general send_message method -from devo_global_comms_python.models.rcs import RcsSendMessageSerializer +from devhub_python.models.rcs import RcsSendMessageSerializer message_data = RcsSendMessageSerializer( recipient="+1234567890", @@ -66,7 +66,7 @@ RCS methods return response objects with fields like: ## Error Handling ```python -from devo_global_comms_python.exceptions import DevoException +from devhub_python.exceptions import DevoException try: message = client.rcs.send_text( diff --git a/docs/sdk/sms.md b/docs/sdk/sms.md index ad04e9b..89045db 100644 --- a/docs/sdk/sms.md +++ b/docs/sdk/sms.md @@ -55,7 +55,7 @@ for number_info in numbers.numbers: ## Error Handling ```python -from devo_global_comms_python.exceptions import DevoException +from devhub_python.exceptions import DevoException try: sms_response = client.sms.send_sms( diff --git a/docs/sdk/whatsapp.md b/docs/sdk/whatsapp.md index e6027b8..aaf0002 100644 --- a/docs/sdk/whatsapp.md +++ b/docs/sdk/whatsapp.md @@ -39,7 +39,7 @@ WhatsApp methods return response objects with fields like: ## Error Handling ```python -from devo_global_comms_python.exceptions import DevoException +from devhub_python.exceptions import DevoException try: message = client.whatsapp.send_text_message( diff --git a/examples/README.md b/examples/README.md index 63e6eeb..e59cf8a 100644 --- a/examples/README.md +++ b/examples/README.md @@ -1,6 +1,6 @@ -# Devo Global Communications SDK - Examples +# DevHub SDK - Examples -This directory contains comprehensive examples for using the Devo Global Communications SDK. Each resource has its own dedicated example file with detailed demonstrations of the available functionality. +This directory contains comprehensive examples for using the DevHub SDK. Each resource has its own dedicated example file with detailed demonstrations of the available functionality. ## 📁 Example Files @@ -96,7 +96,7 @@ The unified messaging resource provides a single API endpoint to send messages t ### 📝 Example Usage ```python -from devo_global_comms_python.models.messages import SendMessageDto +from devhub_python.models.messages import SendMessageDto # Send SMS sms_data = SendMessageDto( @@ -199,7 +199,7 @@ The contact groups resource is fully implemented with all CRUD operations: ### 📝 Example Usage ```python -from devo_global_comms_python.models.contact_groups import CreateContactsGroupDto +from devhub_python.models.contact_groups import CreateContactsGroupDto # Create new contact group (using new services namespace) group_data = CreateContactsGroupDto( @@ -246,7 +246,7 @@ All examples include comprehensive error handling with: All examples use API key authentication: ```python -from devo_global_comms_python import DevoClient +from devhub_python import DevoClient client = DevoClient(api_key="your_api_key_here") ``` diff --git a/examples/contact_groups_example.py b/examples/contact_groups_example.py index 6b71d20..3e7af98 100644 --- a/examples/contact_groups_example.py +++ b/examples/contact_groups_example.py @@ -1,12 +1,8 @@ import os from datetime import datetime -from devo_global_comms_python import DevoClient -from devo_global_comms_python.models.contact_groups import ( - CreateContactsGroupDto, - DeleteContactsGroupsDto, - UpdateContactsGroupDto, -) +from devhub_python import DevoClient +from devhub_python.models.contact_groups import CreateContactsGroupDto, DeleteContactsGroupsDto, UpdateContactsGroupDto def main(): @@ -18,7 +14,7 @@ def main(): client = DevoClient(api_key=api_key) - print("Devo Global Communications - Contact Groups Management Example") + print("DevHub - Contact Groups Management Example") print("=" * 75) print("Using services namespace: client.services.contact_groups") print() diff --git a/examples/contacts_example.py b/examples/contacts_example.py index a12ce41..01c7c84 100644 --- a/examples/contacts_example.py +++ b/examples/contacts_example.py @@ -1,8 +1,8 @@ import os -from devo_global_comms_python import DevoClient -from devo_global_comms_python.exceptions import DevoException -from devo_global_comms_python.models.contacts import ( +from devhub_python import DevoClient +from devhub_python.exceptions import DevoException +from devhub_python.models.contacts import ( AssignToContactsGroupDto, CreateContactDto, CreateCustomFieldDto, @@ -19,7 +19,7 @@ def main(): return client = DevoClient(api_key=api_key) - print("Devo Global Communications - Contacts Management Example") + print("DevHub - Contacts Management Example") print("=" * 60) try: diff --git a/examples/email_example.py b/examples/email_example.py index 67c2567..37a0a16 100644 --- a/examples/email_example.py +++ b/examples/email_example.py @@ -1,6 +1,6 @@ import os -from devo_global_comms_python import DevoClient, DevoException +from devhub_python import DevoClient, DevoException def main(): @@ -21,7 +21,7 @@ def main(): print("📤 Sending email...") email_response = client.email.send_email( subject="Test Email from Devo SDK", - body="This is a test email sent using the Devo Global Communications Python SDK.", + body="This is a test email sent using the DevHub Python SDK.", sender="sender@example.com", recipient="recipient@example.com", ) diff --git a/examples/omni_channel_example.py b/examples/omni_channel_example.py index 1e4a61b..92d4472 100644 --- a/examples/omni_channel_example.py +++ b/examples/omni_channel_example.py @@ -1,8 +1,8 @@ import os from datetime import datetime -from devo_global_comms_python import DevoClient -from devo_global_comms_python.models.messages import SendMessageDto +from devhub_python import DevoClient +from devhub_python.models.messages import SendMessageDto def main(): @@ -21,7 +21,7 @@ def main(): client = DevoClient(api_key=api_key) - print("Devo Global Communications - Omni-channel Messaging Example") + print("DevHub - Omni-channel Messaging Example") print("=" * 70) # Example 1: Send SMS Message @@ -54,12 +54,12 @@ def main(): to="recipient@example.com", **{"from": "sender@yourcompany.com"}, # Use dict unpacking for 'from' field payload={ - "subject": "Welcome to Devo Global Communications!", + "subject": "Welcome to DevHub!", "text": "Hello! This is a plain text email sent via our omni-channel API.", "html": """ -

Welcome to Devo Global Communications!

+

Welcome to DevHub!

This is an HTML email sent via our omni-channel API.

Key features: