This guide will help you get started with the DevHub Python SDK.
Install the SDK using pip:
pip install devhub-pythonInitialize the client with your API key:
from devhub_python import DevoClient
client = DevoClient(api_key="your-api-key")!!! tip "Getting Your API Key" You can get your API key from the Devo dashboard after creating an account.
sms_response = client.sms.send_sms(
recipient="+1234567890",
message="Hello from DevHub SDK!",
sender="+1987654321"
)
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 DevHub SDK.",
sender_email="welcome@example.com"
)
print(f"Email sent with ID: {email_response.id}")whatsapp_response = client.whatsapp.send_text_message(
recipient="+1234567890",
message="Hello via WhatsApp!"
)
print(f"WhatsApp message sent with ID: {whatsapp_response.id}")Always wrap your API calls in try-catch blocks:
from devhub_python.exceptions import DevoException
try:
sms_response = client.sms.send_sms(
recipient="+1234567890",
message="Hello!",
sender="+1987654321"
)
print(f"Success: {sms_response.id}")
except DevoException as e:
print(f"Error: {e}")- Explore the SDK Reference for detailed usage
- Check out more Examples
- Learn about Error Handling