Adapted from beautifulsoup4's inner package, then linted, refactored, reduced, and seasoned to taste.
Development
To run pre-commit checks and tests:
pre-commit run --all-files && pdm run python -m pytest
Examples
To parse a string as HTML, your reciple should call for CampbellsSoup:
from campbells import CampbellsSoup
html_str = "<html><body><p>Hello world!</p></body></html>"
soup = CampbellsSoup(html_str)
Installation
Campbells is available on PyPi:
pip install campbells
The dependencies needed to use html5lib and lxml parsers are not installed by default.
They can be installed with:
Metadata
Release files for campbells 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| campbells-0.3.0.tar.gz | 145.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| campbells-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 318.8 kB
Release files / campbells-0.3.0.tar.gz
| Download URL | campbells-0.3.0.tar.gz |
|---|---|
| Size | 145.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b0c2e4d47e8f9eed71fbe1b44daacb7d950bdca877341b22dfe2aee3d3891654
|
|
BLAKE2b-256 checksum How to use checksums |
22d0319df779ad1fb74df055066ea003cc0e595a9a6bcb48eff60594067bc0a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
pdm/2.8.2 CPython/3.10.6
|
Release files / campbells-0.3.0-py3-none-any.whl
| Download URL | campbells-0.3.0-py3-none-any.whl |
|---|---|
| Size | 173.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
40b3bf04eb7ca46621b03b6c06329ce778344ecbdd484885b8f4ff2f178ffa8c
|
|
BLAKE2b-256 checksum How to use checksums |
90370d08f0064ce7a627ae97bafe39af3774fd45f5952bf65414613f3d7c9429
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
pdm/2.8.2 CPython/3.10.6
|