playwright-apirequest-builder 1.0.0

Last updated:

0 purchases

playwright-apirequest-builder 1.0.0 Image
playwright-apirequest-builder 1.0.0 Images
Add to Cart

Description:

playwrightapirequestbuilder 1.0.0

:performing_arts: Playwright APIRequest builder



Documented
Read it here :link: documentation
Read more about the builder pattern on :link: refactoring.guru
Example
# sync example
from playwright.sync_api import sync_playwright
from playwright_request.sync_builder import RequestBuilder

with sync_playwright() as p:
builder = RequestBuilder(p, base_url='https://playwright.dev/')
request = builder.get("python/docs/intro").create_request()
response = request()
print(response.text())

# async example
import asyncio
from playwright.async_api import async_playwright
from playwright_request.async_builder import RequestBuilder

async def main():
async with async_playwright() as p:
builder = RequestBuilder(p, base_url='https://playwright.dev/')
request = builder.get("python/docs/intro").create_request()
response = await request()
print(await response.text())

asyncio.run(main())

Requirements
Python3
Playwright >= 1.26.0

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.