Skip to main content

PyWebWrench is a Python library that enables you to view web pages and make HTTP requests

Project description

PyWebWrench Library 🖥️

PyWebWrench is a Python library that enables you to view web pages and make HTTP requests using popular Python libraries such as Playwright and Requests.

Usage 🚀

Follow these steps to use the PyWebWrench library:

  1. Import the Library 📦
from pyrequester import PyWebWrench
  1. Create a PyWebWrench Object 👷
pr = PyWebWrench(browser_name="firefox") # You can choose a different browser.
  1. Render a Web Page 🌐 To view a web page, use the render_page function:
page_content = pr.render_page(url="https://www.example.com")
print(page_content)
  1. Control a Web Page 🎛️ To have more control over a web page, use the control_page function:
page = pr.control_page(url="https://www.example.com")
# Perform additional operations
page.close()  # Don't forget to close the page when you're done.
  1. Make HTTP Requests 📞 PyWebWrench uses the Requests library to make HTTP requests. You can use the get, post, put, delete, patch, and head functions for this purpose.

Example of a GET request:

response = pr.get(url="https://api.example.com/data")
print(response.text)

Error Handling ⚠️

UnsupportedBrowserError: You might encounter this error for unsupported browsers.

Supported Browsers 🌐

  • Chromium
  • Chrome
  • Chrome Beta
  • Microsoft Edge
  • Microsoft Edge Beta
  • Microsoft Edge Dev
  • Firefox
  • Firefox ASAN
  • Webkit

Dependencies 🔧

Before using PyWebWrench, make sure to install the following dependencies:

  • Playwright
  • Requests

You can install these dependencies using the following commands:

pip install playwright
pip install requests

Conclusion 🎉

PyWebWrench is a handy Python library for viewing web pages and making HTTP requests. You can open, control, and send requests to web pages using the specified browsers. For more information about usage and functionality, you can explore the source code of PyWebWrench. 🔍

Feel free to contribute or report issues! 🙌

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

PyWebWrench-0.0.2b0.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

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

PyWebWrench-0.0.2b0-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file PyWebWrench-0.0.2b0.tar.gz.

File metadata

  • Download URL: PyWebWrench-0.0.2b0.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for PyWebWrench-0.0.2b0.tar.gz
Algorithm Hash digest
SHA256 ac4c6690420990d3212bc24f77b061e9c2a02aeca4bb7b52e0a23ef6645df647
MD5 5095413f65a514436ef67001fd9198d3
BLAKE2b-256 bcdb738255e48a919af151365a1aea8a0b97d472cfd96df2f1c71b61e20a2e44

See more details on using hashes here.

File details

Details for the file PyWebWrench-0.0.2b0-py3-none-any.whl.

File metadata

  • Download URL: PyWebWrench-0.0.2b0-py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for PyWebWrench-0.0.2b0-py3-none-any.whl
Algorithm Hash digest
SHA256 3a20fff901928e023c72ba30a866fb610aeb364f9f27a7e67566f4da0cbd8c40
MD5 32f07650e8884d224f27fb7554005bea
BLAKE2b-256 08b9c557a8f3b6b76221b8ab6f90970c18b93f3eb83e91b3fb0e3915ac0a73f7

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