Web Valueist
Fetches a value from the web, compares it with a given value and exits with zero exit code if the condition is satisfied
Table of Contents
Installation
You can install web-valueist from PyPI using your preferred package manager:
pip:
pip install web-valueist
Poetry:
poetry add web-valueist
uv:
uv pip install web-valueist
pipenv:
pipenv install web-valueist
Usage
Library
You can import and use web_valueist directly in your Python code without relying on the CLI. The evaluate function returns a generic EvaluateResult dictionary indicating whether the condition was met, along with the extracted and typed parsed values (list[int | float | str | bool]). By default, if a value fails to parse it is silently filtered out, but you can enable strict_parsing=True to instead raise a ParserError.
import web_valueist
result = web_valueist.evaluate(
url="http://example.com",
selector="h1",
parser_name="str",
operator_name="eq",
value="Example Domain",
quantifier="ANY", # Optional, defaults to "ANY"
strict_parsing=False # Optional, defaults to False. If True, unparsable values raise ParserError.
)
if result["success"]:
print(f"Match found! Fetched values (typed): {result['values']}")
else:
print("Condition not met.")
CLI
web_valueist [-h] [--debug] [--json] [--strict-parsing] url parser_name [quantifier] selector operator_name value
positional arguments:
url
parser_name
quantifier Optional: ANY or EVERY (default: ANY)
selector
operator_name
value
options:
-h, --help show this help message and exit
--debug Show debug logs including found values
--json Output input and result as JSON
--strict-parsing Raise error if a fetched value cannot be parsed instead of filtering it
Sample Usage
By default, web_valueist is silent and communicates success or failure via the exit code.
Sample success
python -m web_valueist https://www.ikea.com.cy/en/products/fjallhavre-duvet-warm-240x220-cm/70458057/ int span.price__integer ">" 240
( you can also use gt instead of ">")
Exit Code: 0
Sample failure
python -m web_valueist https://www.ikea.com.cy/en/products/fjallhavre-duvet-warm-240x220-cm/70458057/ int span.price__integer "<" 240
( you can also use lt instead of "<")
Exit Code: 1
Debugging
Use the --debug flag to see the values fetched from the web.
python -m web_valueist https://www.ikea.com.cy/en/products/fjallhavre-duvet-warm-240x220-cm/70458057/ int span.price__integer ">" 240 --debug
Output:
DEBUG:web_valueist.lib:Found value ['245']
JSON Output
Use the --json flag to get a structured output.
python -m web_valueist http://example.com str h1 "eq" "Example Domain" --json
Output:
{"args": {"url": "http://example.com", "parser_name": "str", "quantifier": "ANY", "selector": "h1", "operator_name": "eq", "value": "Example Domain"}, "result": {"success": true, "values": ["Example Domain"]}}
Using Quantifiers
When a selector matches multiple elements, you can use ANY or EVERY.
- ANY (default): At least one selector match needs to satisfy the condition.
- EVERY: All selector matches need to satisfy the condition.
Example using EVERY:
python -m web_valueist https://example.com int EVERY .price ">" 100
If no quantifier is specified, ANY is used by default.
Sample cron job
*/30 * * * * web_valueist "https://www.bazaraki.com/car-motorbikes-boats-and-parts/cars-trucks-and-vans/mazda/mazda-mx5/year_min---71/?ordering=cheapest&lat=35.01804869361969&lng=34.04709596563199&radius=5000&price_max=30000" int .advert__content-price._not-title "<" 22500 &&message="Some fancy car matching your criteria was found" &&if command -v notify-send >/dev/null 2>&1 ; then notify-send "$message"; else say "$message"; fi
Development setup from repository
While in project directory:
./install.sh
Maintainer: csmonk
Metadata
Release files for web-valueist 3.0.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 | Provenance | Actions |
|---|---|---|---|---|
| web_valueist-3.0.0.tar.gz | 9.1 kB | With provenance | Details for web_valueist-3.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| web_valueist-3.0.0-py3-none-any.whl | Python 3 | none | any | Details for web_valueist-3.0.0-py3-none-any.whl |
Total release size: 18.8 kB
Release files / web_valueist-3.0.0.tar.gz
| Download URL | web_valueist-3.0.0.tar.gz |
|---|---|
| Size | 9.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4af8d5e43c7a710c0d8df8be9d22fc1398ccc3e0187c145a6df8bc0ca3764fbb
|
|
BLAKE2b-256 checksum How to use checksums |
d50a94f85ab23015c0cfae9f8b0e27575f81bd83150c370aac33e21ac5d057ee
|
| 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 Mar 21, 2026.
Transparency logRelease files / web_valueist-3.0.0-py3-none-any.whl
| Download URL | web_valueist-3.0.0-py3-none-any.whl |
|---|---|
| Size | 9.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1569e29f520f6e6513ad8907979f15c2050f9a44277b0348fc78fdd2e6befd06
|
|
BLAKE2b-256 checksum How to use checksums |
a7dced87359f1075a03e1063eaa615e2e2142e93888ffbb36353d95643add665
|
| 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 Mar 21, 2026.
Transparency logSecurity for web-valueist 3.0.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for web_valueist-3.0.0.tar.gz
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 Mar 21, 2026.
Transparency logA 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.