Playwright automation monitoring SDK
Project description
Clio SDK
Python SDK for Clio - Playwright automation monitoring service.
Installation
pip install clio_monitoring
Quick Start
from playwright.async_api import async_playwright
from clio import ClioMonitor
# Initialize Clio
monitor = ClioMonitor(api_key="your-api-key")
async def test_example():
async with async_playwright() as p:
browser = await p.chromium.launch()
# Create context with video recording enabled
context = await browser.new_context(
record_video_dir="./videos",
record_video_size={"width": 1280, "height": 720}
)
# Start monitoring this test
await monitor.start_run(
context=context,
automation_name="User Login Test",
success_criteria="User successfully logs in and sees dashboard",
playwright_instructions="Navigate to login page, enter credentials, verify dashboard loads"
)
# Your test code here
page = await context.new_page()
await page.goto("https://example.com/login")
# ... rest of your test
# Videos and traces are automatically uploaded when context closes
await context.close()
await browser.close()
Configuration
monitor = ClioMonitor(
api_key="your-api-key",
base_url="https://api.cliomonitoring.com", # Optional: for self-hosted instances
retry_attempts=3, # Optional: number of upload retry attempts
raise_on_error=False # Optional: raise exceptions on errors
)
Features
- Automatic Upload: Videos and traces are automatically uploaded when the browser context closes
- Retry Logic: Failed uploads are automatically retried
- Rate Limiting: Respects your organization's monthly rate limits
- Error Handling: Configurable error handling (log or raise exceptions)
Requirements
- Python 3.8+
- Playwright 1.40+
License
MIT
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
clio_monitoring-0.1.9.tar.gz
(61.2 kB
view details)
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 clio_monitoring-0.1.9.tar.gz.
File metadata
- Download URL: clio_monitoring-0.1.9.tar.gz
- Upload date:
- Size: 61.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ac65388f69219aee8feb0ce65a07ec3fa97e20947e41f448774dea71036b3a5
|
|
| MD5 |
1b9e4b64c41c7e96cd643a7f0b79f141
|
|
| BLAKE2b-256 |
f4f368e09d50944c9570b10141b39e1c8daddcb756924e0cb928b90632b04e0d
|
File details
Details for the file clio_monitoring-0.1.9-py3-none-any.whl.
File metadata
- Download URL: clio_monitoring-0.1.9-py3-none-any.whl
- Upload date:
- Size: 11.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d3057085d73d211b5f2dc1b95700c14c26dbe7c18e90f2c6ceade1065dd0898
|
|
| MD5 |
863dd568ff4174b9e0ec9b850714b93e
|
|
| BLAKE2b-256 |
9afe7cbb95923cd1a5510b5635d9d0f4840100c43f27f20fbf41139a1874083d
|