Skip to main content

Global Price Parser for Python

Read exact amounts and ISO 4217 currencies from international text or HTML. No runtime dependencies. Python 3.9 or newer.

pip install global-price-parser
from global_price_parser import parse_price, parse_prices, read_page_signals

price = parse_price("1.299,00 €")
print(price.amount, price.currency, price.currency_sure)
# 1299.00 EUR True

price = parse_price("$25", url="https://shop.example.ca/p/1")
print(price.amount, price.currency, price.decided_by)
# 25.00 CAD url.tld

print([(p.amount, p.currency) for p in parse_prices("Was $30, now $25")])
# [('30.00', 'USD'), ('25.00', 'USD')]

print(read_page_signals('<html lang="fr-CA"></html>').to_dict())
# {'currency': [], 'country': [{'source': 'page.lang', 'country': 'CA'}], 'language': 'fr-CA'}

parse_price returns a frozen Price dataclass or None. parse_prices returns only prices carrying their own currency symbol, code or word. Both accept keyword-only currency, country, language, url, page and html options. HTML is detected automatically unless html is set. page supplies separate HTML for currency evidence. read_page_signals accepts an HTML string and an optional keyword-only url.

Python fields use snake_case; to_dict() returns the reference camelCase JSON shape. amount is the exact decimal string; value is a float. index counts Python characters in the extracted text, not HTML offsets.

Only standard absolute HTTP(S) URLs are read; DOM input is TypeScript only. URLs are inspected locally, with no network requests.

Documentation and examples

Development

python3 scripts/sync_data.py
python3 -m venv .venv
.venv/bin/pip install -q -e . pytest
.venv/bin/pytest -q

The tests compare every shared spec/cases/*.jsonl case with the TypeScript reference and verify that the packaged JSON data matches ../data.


Made with ❤️ by the DontPayFull team
Coupon codes and deals for 20,000+ online stores

Metadata

Release files for global-price-parser 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 global-price-parser 0.1.1
File Size Uploaded Provenance Actions
global_price_parser-0.1.1.tar.gz 54.3 kB With provenance Details for global_price_parser-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for global-price-parser 0.1.1
File Interpreter ABI Platform Actions
global_price_parser-0.1.1-py3-none-any.whl Python 3 none any Details for global_price_parser-0.1.1-py3-none-any.whl

Total release size: 110.6 kB

Release files / global_price_parser-0.1.1.tar.gz

Download URL global_price_parser-0.1.1.tar.gz
Size 54.3 kB
Tags Source
SHA-256 checksum
How to use checksums
7efe5e994af468af5ff549b275316308311d052d914fe41f408b0de8e6edf8d3
BLAKE2b-256 checksum
How to use checksums
b52f7837e9584df9f17378d4d88d84d916affe85a580fba6ea1a0c1223e6b642
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 23, 2026.

Transparency log

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

Download URL global_price_parser-0.1.1-py3-none-any.whl
Size 56.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
07571c1f1d48dd6532339d2b34b466c7aa3ac9185452e0a3e8b6d12404792261
BLAKE2b-256 checksum
How to use checksums
c2b205fa11fabfbc20ac03867da1ae1d18ecc74bd358f7427e215a440fb23161
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 23, 2026.

Transparency log

Security for global-price-parser 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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for global_price_parser-0.1.1.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 Nov 23, 2026.

Transparency log

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 Full 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