Skip to main content

A minimal python http client that runs real JS/DOM (htmx and friends) without a browser

Project description

miniclient

CI codecov Docs PyPI Python versions License

A minimal python http client that runs JavaScript, without a browser. Meant to be used as a lightweight test client to simulate browser interactions. Embeds a V8 Runtime, DOM, and is designed to run htmx especially well.

Install

uv add miniclient

Example

The snippet below opens a page, submits a search form, clicks a "load more" button and reads the results back. All against a real in-memory DOM running JavaScript (htmx, for example). No browser involved.

from miniclient.browser import Browser

with Browser() as browser:
    browser.goto("http://localhost:8000/")
    browser.find("input[name=q]").fill("htmx")
    browser.find("form").requestSubmit()
    browser.find("#load-more").click()
    print(len(browser.find_all("#results li")), "results")
    print(browser.find("#results li:first-child").text)

Check the full documentation: https://marciomazza.github.io/miniclient/

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

miniclient-0.0.6.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

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

miniclient-0.0.6-py3-none-any.whl (2.1 MB view details)

Uploaded Python 3

File details

Details for the file miniclient-0.0.6.tar.gz.

File metadata

  • Download URL: miniclient-0.0.6.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for miniclient-0.0.6.tar.gz
Algorithm Hash digest
SHA256 8c91d21cf8bda7b9eefeed5f408ffb55de2a77e2cadfe33dbad49f0077ea743b
MD5 1ed698572c8cb9c4420dd191ddc833e6
BLAKE2b-256 92baf7f96c726f3dff728e1c5afc8831f93e8f357f83f2f50a1132e12faf4326

See more details on using hashes here.

Provenance

The following attestation bundles were made for miniclient-0.0.6.tar.gz:

Publisher: release.yml on marciomazza/miniclient

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file miniclient-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: miniclient-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 2.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for miniclient-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 4bbd57a5d640d643a74943e967b30e62fdd5b8f154307eb5bd8912563540d0ae
MD5 761012d20477f07ff2483b67b39b874b
BLAKE2b-256 7581e1d747307dbb98a4845fe078348143095671e33926735f47d576a2d37361

See more details on using hashes here.

Provenance

The following attestation bundles were made for miniclient-0.0.6-py3-none-any.whl:

Publisher: release.yml on marciomazza/miniclient

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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