Official Python SDK for WackyPod - AI-powered text-to-podcast platform
Project description
WackyPod Python SDK
Official Python SDK for WackyPod -- the AI-powered text-to-podcast platform. Transform any content into professional-quality podcasts with just a few lines of code.
Features
- Episode Generation -- Create podcasts from URLs or raw text with configurable presets (quick, standard, deep, extended)
- Multi-Speaker Dialogue -- Generate single-host or multi-host conversational podcasts
- Webhook Management -- Set up real-time notifications for episode completion, failure, and other events
- User and Quota Management -- Check account profile, tier, and monthly usage
- Async Polling -- Built-in
wait_for_completionwith configurable timeout and poll interval - Typed Models -- Dataclass-based response objects (
Episode,Webhook,User) for IDE autocompletion - Comprehensive Error Handling -- Typed exceptions for authentication, validation, rate limiting, and server errors
- PEP 561 Compatible -- Ships with
py.typedmarker for full type-checking support
Installation
pip install wackypod
Quick Start
from wackypod import WackyPod
# Initialize the client with your API key
client = WackyPod(api_key="your_api_key_here")
# Create a podcast episode from a URL
episode = client.episodes.create(
input_type="url",
input_source="https://example.com/article",
preset="standard"
)
print(f"Episode created: {episode.id}")
print(f"Status: {episode.status}")
# Wait for the episode to finish processing
episode = client.episodes.wait_for_completion(episode.id)
print(f"Title: {episode.title}")
print(f"Audio URL: {episode.audio_url}")
print(f"Duration: {episode.audio_duration_seconds}s")
Create a multi-host episode from text
episode = client.episodes.create(
input_type="text",
input_source="Your article or essay text here...",
preset="deep",
host_mode="multi",
voice_pair="expert-curious"
)
episode = client.episodes.wait_for_completion(episode.id, timeout=900)
Manage webhooks
# Register a webhook for episode events
webhook = client.webhooks.create(
url="https://example.com/webhook",
events=["episode.completed", "episode.failed"],
description="Production notifications"
)
# Save the secret for signature verification
print(f"Webhook secret: {webhook.secret}")
Check account quota
user = client.users.get_profile()
print(f"Plan: {user.tier}")
quota = client.users.get_quota()
print(f"Episodes used: {quota['episodes_used']}/{quota['episodes_limit']}")
API Reference
Client
client = WackyPod(
api_key="your_api_key", # Required
base_url="https://api.wackypod.com", # Optional -- custom API endpoint
timeout=30 # Optional -- request timeout in seconds
)
Get your API key at wackypod.com/settings/api.
Episodes
| Method | Description |
|---|---|
client.episodes.create(...) |
Create a new podcast episode |
client.episodes.get(episode_id) |
Retrieve an episode by ID |
client.episodes.list(status=None, limit=50) |
List episodes with optional filters |
client.episodes.delete(episode_id) |
Delete an episode |
client.episodes.wait_for_completion(episode_id, timeout=600, poll_interval=5) |
Poll until episode is ready |
Episode presets: quick (1-3 min), standard (5-8 min), deep (10-15 min), extended (20-30 min)
Host modes: single (narrated), multi (conversational dialogue)
Webhooks
| Method | Description |
|---|---|
client.webhooks.create(url, events, description=None) |
Register a new webhook endpoint |
client.webhooks.get(webhook_id) |
Retrieve a webhook by ID |
client.webhooks.list() |
List all webhooks |
client.webhooks.update(webhook_id, ...) |
Update webhook configuration |
client.webhooks.delete(webhook_id) |
Delete a webhook |
client.webhooks.test(webhook_id) |
Send a test event |
client.webhooks.get_deliveries(webhook_id) |
View delivery history |
Webhook events: episode.completed, episode.failed, episode.processing
Users
| Method | Description |
|---|---|
client.users.get_profile() |
Get current user profile |
client.users.get_quota() |
Get monthly quota usage |
Error Handling
All exceptions inherit from WackyPodError for convenient catch-all handling:
from wackypod import (
WackyPodError, # Base exception
AuthenticationError, # Invalid API key (401)
ValidationError, # Bad request data (400)
NotFoundError, # Resource not found (404)
RateLimitError, # Rate limit exceeded (429)
ServerError, # Server error (5xx)
)
try:
episode = client.episodes.create(
input_type="url",
input_source="https://example.com/article"
)
except AuthenticationError:
print("Check your API key")
except RateLimitError:
print("Slow down -- rate limit exceeded")
except WackyPodError as e:
print(f"API error: {e}")
Requirements
- Python 3.8+
- requests >= 2.28.0
Development
git clone https://github.com/ferax564/wackypod-python.git
cd wackypod-python
pip install -e ".[dev]"
# Run tests
pytest
# Format code
black wackypod/
# Type checking
mypy wackypod/
Documentation
Full API documentation is available at docs.wackypod.com.
License
MIT License -- see LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wackypod-0.1.0.tar.gz.
File metadata
- Download URL: wackypod-0.1.0.tar.gz
- Upload date:
- Size: 12.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da92bb0d35ac47eec927c65889eaa8bd6a878f685e3000f8a3422fa6ad548f59
|
|
| MD5 |
29cb8cbd79727d6f31730451780c3e37
|
|
| BLAKE2b-256 |
6d1bf87eee6526c0f81ef269382a07fe1f349dfc7381c8a1e83775f7f070b8bb
|
File details
Details for the file wackypod-0.1.0-py3-none-any.whl.
File metadata
- Download URL: wackypod-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81d798c9995c622267237e57a60e77219afd3e84d3d62a57ffbb46b5bcc93fd1
|
|
| MD5 |
676ee1a19e54bbc3dddd0c3c67a590f6
|
|
| BLAKE2b-256 |
43baed1b19c36b4f42d533efc86847fd9dd1b796f4958d9aed57b38d3cc47831
|