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.0

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.0
File Size Uploaded Provenance Actions
global_price_parser-0.1.0.tar.gz 54.2 kB With provenance Details for global_price_parser-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 110.5 kB

Release files / global_price_parser-0.1.0.tar.gz

Download URL global_price_parser-0.1.0.tar.gz
Size 54.2 kB
Tags Source
SHA-256 checksum
How to use checksums
ef962b36b5623d197054fd7775199f265abaa3dc730e2de495ae3f5dff297032
BLAKE2b-256 checksum
How to use checksums
8d88cd518b0f7f3238cb753e5ca3e522ddc23f89c7079d2928ee4dcc59c7bb09
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 Oct 31, 2026.

Transparency log

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

Download URL global_price_parser-0.1.0-py3-none-any.whl
Size 56.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dcab0022391fffe78eb9412c33f9fc46dbd79d57510b55639d2ef784623ae713
BLAKE2b-256 checksum
How to use checksums
c68a50f4d2aec2566b2354581487f02328ad04784648b6372d28f3fc567a3361
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 Oct 31, 2026.

Transparency log

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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for global_price_parser-0.1.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 Oct 31, 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.0 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