Skip to main content

PureHTML

PureHTML is a parsing specification for extracting JSON from HTML.

Installation:

To install PureHTML, you can use pip with following command:

  pip install purehtml

Usage

from purehtml import ConfigFactory, extract

yaml_string = """
selector: span
type: array
items: {}
"""
html_string = """
<div>
  <span>a</span>
  <span>b</span>
  <span>c</span>
</div>
"""
expected_output = "['a', 'b', 'c']"

config = ConfigFactory.from_yaml(yaml_string)

print(f"Extracted output : {extract(config, html_string, 'http://example.com')}")
print(f"Expected  output : {expected_output}")

Development

For testing, we use test specifications defined in <purehtml root>/specs. You may run python3 run_tests.py to check if the python implementation is working correctly or has some incompatibilities.

Building

  1. Install build pip with this command: python3 -m pip install --upgrade build
  2. Execute make clean build to create a clean build output. The output will be placed in dist/

Publishing to Python Package Index

  1. Install the twine package: python3 -m pip install --upgrade twine
  2. Publish to pypi: python3 -m twine upload dist/* or with make publish

License

MIT

Metadata

Release files for purehtml-fatihky 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for purehtml-fatihky 0.1.1
File Size Uploaded Provenance Actions
purehtml_fatihky-0.1.1.tar.gz 13.8 kB Without provenance Details for purehtml_fatihky-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for purehtml-fatihky 0.1.1
File Interpreter ABI Platform Actions
purehtml_fatihky-0.1.1-py3-none-any.whl Python 3 none any Details for purehtml_fatihky-0.1.1-py3-none-any.whl

Total release size: 37.6 kB

Release files / purehtml_fatihky-0.1.1.tar.gz

Download URL purehtml_fatihky-0.1.1.tar.gz
Size 13.8 kB
Tags Source
SHA-256 checksum
How to use checksums
66122638028c06a0a650ee009bf4c52344652d3127979e6cba15888661c3b385
BLAKE2b-256 checksum
How to use checksums
2bb071629eefe0cfcf1d053c308d8af682d623ee0d117d68def9d515a8304e09
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.7

Release files / purehtml_fatihky-0.1.1-py3-none-any.whl

Download URL purehtml_fatihky-0.1.1-py3-none-any.whl
Size 23.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
224e2c9050dfe646ac91efe3e93c9de7153a74ef68932d3edc2ea5b2f401841f
BLAKE2b-256 checksum
How to use checksums
3e729f5a8655516462676f57b8f4bb7e7dfaec0167cb1f123f7455493ef863b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.7

Security for purehtml-fatihky 0.1.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page