--- id: price-parser version: "0.5.1" license: BSD-3-Clause license_treatment: permissive maintenance: active --- # price-parser — Extract price and currency from a raw string License: permissive · Maintenance: active · Downloads: 820.1K/mo ## What it is and what it does price-parser is a small library for extracting structured price data from raw text. It parses price amounts and currency symbols from messy strings—the kind you'd extract from a web page with a CSS selector—and returns them as a Price object with numeric amount (as Decimal), currency symbol, and original text representations. The library handles the tedious parts: thousand and decimal separators that vary by locale (commas, periods, spaces), currency symbols in different positions, and edge cases like free items or ambiguous formatting. The main use case is web scraping: instead of writing site-specific regex or parsing logic, you pass a price string to Price.fromstring() and get back clean, normalized data. It supports a wide range of international formats and currencies, with optional hints for disambiguation when the input is ambiguous. When extraction fails, it gracefully returns None for missing fields rather than raising exceptions. Use it for: - Web scraping: extract and normalize prices from product pages across different e-commerce sites. - Price comparison tools: parse prices from multiple sources with different formatting conventions. - Data cleaning: normalize price strings in bulk datasets before analysis or storage. - Localized shopping apps: handle prices in different currencies and decimal/thousand separator conventions. - Automated price monitoring: extract prices from HTML snapshots for historical tracking or alerts. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Extracts price amounts and currency symbols from unstructured text strings, handling varied formats, thousand separators, and decimal separators across multiple locales. Yes. Low install friction, active maintenance, no known vulnerabilities, permissive license, and a focused, well-tested utility (900+ real-world test cases). Install if you need to parse prices from text; skip if you only work with structured price data or APIs that already return normalized amounts. ## Install pip install price-parser uv add price-parser poetry add price-parser ## Installing price-parser Before you install: Low friction installation with a single lightweight dependency (attrs). Active maintenance with recent releases; last commit 2026-08-06 and latest release 2026-03-19. Supports Python 3.9 through 3.14. License in practice: BSD-3-Clause permissive license allows commercial and private use with minimal restrictions; suitable for most projects. Quickstart: pip install price-parser from price_parser import Price price = Price.fromstring("22,90 €") print(price.amount, price.currency) Requires Python 3.9 or later. Verify before relying: - Whether the library handles all Unicode currency symbols or only a defined set. - Performance characteristics when parsing large batches of price strings. - Whether currency_hint matching is case-sensitive or locale-aware. ## Package facts - License: BSD-3-Clause (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 820.1K/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags parse price from text, extract currency and amount, price string parsing, currency extraction, web scraping price cleanup, decimal separator handling, international price parsing, web-scraping, data-extraction, parsing [View on SkillFed](https://skillfed.io/packages/price-parser) · [View on PyPI](https://pypi.org/project/price-parser/)