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

Uploaded Python 3

File details

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

File metadata

  • Download URL: miniclient-0.0.10.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.10.tar.gz
Algorithm Hash digest
SHA256 39cb552f7b0fa1938e93a48b2a9ff1f735541901163360e1328a129e652789a9
MD5 f598ed4fd09e6bcbd2083c307b38097d
BLAKE2b-256 23f42f183e1a535ea18ba456ef1d36bb84eac175ec6688f1dd272729e1e453ed

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: miniclient-0.0.10-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.10-py3-none-any.whl
Algorithm Hash digest
SHA256 f92a7f7bc3eddd6c2aa7b136afdbd1a951c918dab1d129bebe57a4dcd73eb879
MD5 d6b2964d6f51300433c16690f096cd81
BLAKE2b-256 763b8c421495e18ba3e55b939c9cea14090ecc709360f644e953f091cd7aa0dd

See more details on using hashes here.

Provenance

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