Playwright APIRequest builder
Project description
: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
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
Close
Hashes for playwright-apirequest-builder-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 758d5857e73a7e4a41bd1bba2662b64163fd4f9467841398329b2edc73d0f399 |
|
MD5 | 401209050c75ec7b716f7ddb6c9cdc70 |
|
BLAKE2b-256 | cd7adab28254cafbb27ed7860be7addbc56f77cdbc7f1aed61d70b0387150b2c |
Close
Hashes for playwright_apirequest_builder-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ce7a760664a78fef1862900e4d98be31b3eb067ec489fec30b6d23123219371 |
|
MD5 | e4667c8020228a72873dc3ae54e4fbc7 |
|
BLAKE2b-256 | 72c518c8590750be175542b31e0e6abf604c502b67b779291f18892e40fdea6d |