π Introduction
WyseOS Python SDK empowers developers to seamlessly integrate Python applications with APIs from WyseOS.
It is designed to offer a superior development experience through:
- π§© Simplified API Interactions: Say goodbye to complex HTTP requests and WebSocket intricacies. The SDK abstracts these complexities, allowing you to focus purely on your application logic.
- π οΈ Comprehensive Functionality: Access all core WyseOS features, from client initialization and direct API calls to real-time WebSocket communication.
- β Structured and Type-Safe Models: Benefit from clear, Pydantic-based data models for all requests and responses, ensuring type safety and reducing common integration errors.
- π Robust Error Handling: Quickly diagnose and resolve issues with detailed, specific error types to provide actionable insights.
π What's New in v0.2.1
Experience the TaskRunner - a groundbreaking simplification of WebSocket operations:
- π― TaskRunner Interface: Reduces complex WebSocket operations by 90%, transforming 400+ lines of code into just 10-20 lines
- β‘ Dual Execution Modes:
run_task()for fully automated executionrun_interactive_session()for user-guided interactions
- π§ Smart Configuration:
TaskExecutionOptionsprovides performance-optimized defaults with flexible customization - π Comprehensive Results:
TaskResultcaptures execution duration, detailed logs, screenshots, and complete session metadata - π Instant Productivity: Get from zero to running tasks in under 30 seconds
Before vs. After
# β Before: Complex 400+ line setup
def websocket_operations(client, session, task):
# 400+ lines of complex WebSocket handling...
# β
After: Simple 10-line solution
task_runner = client.websocket.create_task_runner(client, session)
result = task_runner.run_task("Analyze market trends", "wyse_mate")
print(f"β
Task completed: {result.final_answer}")