{"id":26199541,"url":"https://github.com/valentinogagliardi/unbrowsed","last_synced_at":"2025-04-15T04:53:04.529Z","repository":{"id":280879233,"uuid":"943223293","full_name":"valentinogagliardi/unbrowsed","owner":"valentinogagliardi","description":"A browserless HTML testing library for Python.","archived":false,"fork":false,"pushed_at":"2025-03-20T21:02:19.000Z","size":131,"stargazers_count":8,"open_issues_count":12,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T07:51:36.605Z","etag":null,"topics":["a11y","a11y-testing","dom","dom-testing","html5","python","python-html","python-testing","testing-library","testing-tools"],"latest_commit_sha":null,"homepage":"https://unbrowsed.readthedocs.io/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/valentinogagliardi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/contributing.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-05T11:07:05.000Z","updated_at":"2025-04-05T07:48:31.000Z","dependencies_parsed_at":"2025-03-13T00:21:38.741Z","dependency_job_id":null,"html_url":"https://github.com/valentinogagliardi/unbrowsed","commit_stats":null,"previous_names":["valentinogagliardi/unbrowsed"],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valentinogagliardi%2Funbrowsed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valentinogagliardi%2Funbrowsed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valentinogagliardi%2Funbrowsed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valentinogagliardi%2Funbrowsed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/valentinogagliardi","download_url":"https://codeload.github.com/valentinogagliardi/unbrowsed/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248182064,"owners_count":21060892,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["a11y","a11y-testing","dom","dom-testing","html5","python","python-html","python-testing","testing-library","testing-tools"],"created_at":"2025-03-12T02:59:03.633Z","updated_at":"2025-04-15T04:53:04.522Z","avatar_url":"https://github.com/valentinogagliardi.png","language":"Python","readme":"# unbrowsed\n\nA browserless HTML testing library for Python, inspired by [testing-library](https://testing-library.com/).\n\n## Overview\n\nunbrowsed 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.\n\n## Features\n\n- Fast HTML parsing with [selectolax](https://github.com/rushter/selectolax)\n- Query functions that encourage accessible testing practices\n\n## Installation\n\n```bash\npip install unbrowsed\n```\n\n## Usage\n\n### Basic Example\n\n```python\nfrom unbrowsed import parse_html, query_by_label_text\n\n# Parse HTML content\nhtml = \"\"\"\n\u003cform\u003e\n    \u003clabel for=\"username\"\u003eUsername\u003c/label\u003e\n    \u003cinput id=\"username\" type=\"text\"\u003e\n    \u003clabel for=\"password\"\u003ePassword\u003c/label\u003e\n    \u003cinput id=\"password\" type=\"password\"\u003e\n    \u003cbutton type=\"submit\"\u003eLogin\u003c/button\u003e\n\u003c/form\u003e\n\"\"\"\ndom = parse_html(html)\n\n# Query elements by label text\nusername_input = query_by_label_text(dom, \"Username\")\nassert username_input is not None\n```\n\n## Development\n\n### Setup\n\n```bash\n# Clone the repository\ngit clone https://github.com/username/unbrowsed.git\ncd unbrowsed\n\n# Create a virtual environment\npython -m venv venv\nsource venv/bin/activate  # On Windows: venv\\Scripts\\activate\n\n# Install development dependencies\npip install -e \".[test]\"\n```\n\n### Running Tests\n\n```bash\npytest\n```\n\n### Releasing a New Version\n\nTo release a new version:\n\n1. Update the version in `pyproject.toml`\n2. Create and push a new tag:\n\n```bash\ngit tag 0.1.0\ngit push origin 0.1.0\n```\n\nThis will trigger the CI pipeline to build and publish the package to PyPI automatically.\n\n## License\n\nMIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalentinogagliardi%2Funbrowsed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvalentinogagliardi%2Funbrowsed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalentinogagliardi%2Funbrowsed/lists"}