miniclient¶
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.
This project is under active development. The API is experimental and might change. We've got a lot of tests but things might break.
Main Components¶
- httpx2 for a fully featured HTTP client, with special support for testing WSGI/ASGI apps (Django, Flask, FastAPI).
- jsrun (V8 via deno_core + PyO3 bindings) for the JavaScript runtime. No Node.js.
- happy-dom for a fast DOM implementation in pure JavaScript.
htmx¶
- htmx integration is thoroughly tested. The complete core htmx test suite passes and most of the design was done to support it.
We currently support only htmx version 4
Why?¶
Testing against a real browser feels too slow. And mostly unnecessary.