This release is a pre-release and may not be stable for production use.
unbrowsed
A browserless HTML testing library for Python, inspired by testing-library.
Overview
unbrowsed allows you to test HTML without spawning a browser. It provides a simple, intuitive API for querying HTML elements similar to testing-library's approach, encouraging accessible and maintainable tests.
Features
- Fast HTML parsing with selectolax
- Query functions that encourage accessible testing practices
Installation
pip install unbrowsed
Usage
Basic Example
from unbrowsed import parse_html, query_by_label_text
# Parse HTML content
html = """
<form>
<label for="username">Username</label>
<input id="username" type="text">
<label for="password">Password</label>
<input id="password" type="password">
<button type="submit">Login</button>
</form>
"""
dom = parse_html(html)
# Query elements by label text
username_input = query_by_label_text(dom, "Username")
assert username_input is not None
Development
Setup
# Clone the repository
git clone https://github.com/username/unbrowsed.git
cd unbrowsed
# Create a virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install development dependencies
pip install -e ".[test]"
Running Tests
pytest
Releasing a New Version
To release a new version:
- Update the version in
pyproject.toml - Create and push a new tag:
git tag 0.1.0
git push origin 0.1.0
This will trigger the CI pipeline to build and publish the package to PyPI automatically.
License
MIT
Metadata
Release files for unbrowsed 0.1.0a23
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| unbrowsed-0.1.0a23.tar.gz | 18.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| unbrowsed-0.1.0a23-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 30.0 kB
Release files / unbrowsed-0.1.0a23.tar.gz
| Download URL | unbrowsed-0.1.0a23.tar.gz |
|---|---|
| Size | 18.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1b7a8c8db23c80cfd3182ff1f1b5ceaa98013bc9d004ae843f795d60e89e800e
|
|
BLAKE2b-256 checksum How to use checksums |
74888fa5f8c2d6ecc46b54c5cee8e0f7dfc3c4f6f4fe715b0a46e19ea42a0f9e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 3, 2025.
Transparency logRelease files / unbrowsed-0.1.0a23-py3-none-any.whl
| Download URL | unbrowsed-0.1.0a23-py3-none-any.whl |
|---|---|
| Size | 11.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
94dcdc3f7c95a9a2d5db5c83aea38448ea9f330b1f82a77e877a850a4a31abc6
|
|
BLAKE2b-256 checksum How to use checksums |
0d80981618c12b18a1b9132db1361cf8a0e257e3cc9166c26c6cfcd051a867ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 3, 2025.
Transparency log