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.9.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.9-py3-none-any.whl (2.1 MB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for miniclient-0.0.9.tar.gz
Algorithm Hash digest
SHA256 4e821649999159c0217f1e8f7bab692b88feda62e9f3198e61ee6753d893c7e0
MD5 45e4596dd82fda10fc422f98279e58fc
BLAKE2b-256 013c9888d8e70e66b343649e1ddadaebcf892631e5629285751fe97ae56cb146

See more details on using hashes here.

Provenance

The following attestation bundles were made for miniclient-0.0.9.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.9-py3-none-any.whl.

File metadata

  • Download URL: miniclient-0.0.9-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.14

File hashes

Hashes for miniclient-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 441efe4b9008176f7d77b7c3590e9ab06e4b41a2bb58c14be2c4661f4149c719
MD5 efc28e6c5c9624a5d024393bab0c64d7
BLAKE2b-256 8519da2fb985366e7fd68bf7c861dfbbecf71f4afb12c025bfa9cab4106a5e8e

See more details on using hashes here.

Provenance

The following attestation bundles were made for miniclient-0.0.9-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