Skip to main content

Playwright automation monitoring SDK

Project description

Clio SDK

Python SDK for Clio - Playwright automation monitoring service.

Installation

pip install clio

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.clio.dev",  # 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
  • Non-blocking: Uploads happen asynchronously without blocking your tests
  • 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


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.1.tar.gz (57.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

clio_monitoring-0.1.1-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file clio_monitoring-0.1.1.tar.gz.

File metadata

  • Download URL: clio_monitoring-0.1.1.tar.gz
  • Upload date:
  • Size: 57.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for clio_monitoring-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a336c9e6499db7a47d84458053b54cf3834ce1192504ae1d9237c25f8f24362c
MD5 1e1356b8fd878a6bd20d75ea6e01ecff
BLAKE2b-256 37c95257214b17ab2f7cf75b7414e319f00322f6d53699fec1c7ecb9f8e488af

See more details on using hashes here.

File details

Details for the file clio_monitoring-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for clio_monitoring-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fc4fc39841c0503ab920949feebb076d2b47fe470fee2bba5bcdaa57e4853372
MD5 af7e1832911355fa4008c33ff23da37b
BLAKE2b-256 b8152016654648fb31c46dc2a214340d33ebe5bf7ea626ed59585998bbf65c3d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page