purchase-history-parsers
Parse store purchase histories into plain Python records: what you bought, when, for how much, and how you paid, going as far back as each store's own history.
Part of infinparse. Each parser takes one file you exported from your own account and returns a
list of Purchase dataclasses. No parser logs in or makes network calls. For stores with no export button, the
browser exporters produce the file from your own logged-in browser session.
Supported stores
| Store | File you need | How to get it | Parser | Runbook |
|---|---|---|---|---|
| Steam | purchase-history page, saved as HTML | exporter | steam |
docs/sources/steam.md |
| Google Play | order-history page, saved as HTML | exporter | google_play |
docs/sources/google_play.md |
| Humble Bundle | humble-orders.PERSONAL.json |
exporter | humble |
docs/sources/humble.md |
| Amazon | Your Orders.zip |
Amazon's data request | amazon |
docs/sources/amazon.md |
| PlayStation Store | receipt email saved as .html |
your mail client | playstation |
docs/sources/playstation.md |
Any currency works; each row keeps the currency the store shows. Some parsers expect English-language pages; see each runbook.
Install and use
pip install purchase-history-parsers
One dependency: Beautiful Soup, for reading saved HTML pages.
from purchase_history_parsers import parser
rows = parser("steam").parse("steam-purchase-history.PERSONAL.html") # list[Purchase]
parser("mypkg.mystore") loads your own parser by dotted path, so you don't need a fork.
Exporters
The exporters are small JavaScript files that run in your browser, on the store's own page, while you're logged in. Each loads your full history and downloads the file the matching parser reads. Install one in a userscript manager (Tampermonkey, Violentmonkey) to get an "Export" button on the page, or paste it into the browser's developer console to run it once. Your password never touches this package, and the Python parsers never go online.
What an exporter saves is only what its parser reads: the history rows, with no page scripts, session data, account
email or profile. It is still your purchase history, so the file name says PERSONAL and the page carries a
banner. Keep it private: never attach it to an issue. To report a parsing problem, describe the layout or share
masked structure instead.
The model
Purchase
| Field | Type | Meaning |
|---|---|---|
store |
str |
steam, amazon, ... |
order_id |
str |
the store's id (or a stable hash when the store shows none) |
date |
date |
order date |
items |
str |
item names joined with | |
kind |
str |
purchase, refund, market or other |
amount |
Decimal |
+ spent, − returned, in currency |
currency |
str |
INR, USD, ... |
payment |
str |
payment method as the store shows it |
original_amount |
Decimal | None |
pre-discount price, if shown |
charged |
Decimal | None |
part paid from a real account (0 if store credit paid it all; None = all of amount) |
refunded |
bool |
the store marks the order refunded |
raw_type |
str |
the store's own type or status text |
Licence
MIT. See LICENSE.
Metadata
Release files for purchase-history-parsers 0.1.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 | |
|---|---|---|---|---|
| purchase_history_parsers-0.1.0.tar.gz | 7.9 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| purchase_history_parsers-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.8 kB
Release files / purchase_history_parsers-0.1.0.tar.gz
| Download URL | purchase_history_parsers-0.1.0.tar.gz |
|---|---|
| Size | 7.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eab224ec7342434d8d5297c03ccfff98ee1d7347424d7f36bd98fa1a5d5ea06a
|
|
BLAKE2b-256 checksum How to use checksums |
8e81d57ca0999b65bc160fbea8ee6a5f8c1b50a689493dd01fa05a518a4685ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 22, 2026.
Transparency logRelease files / purchase_history_parsers-0.1.0-py3-none-any.whl
| Download URL | purchase_history_parsers-0.1.0-py3-none-any.whl |
|---|---|
| Size | 10.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
57ea00e20f671820b626279b4d9166d0dc248b15dba1d0a7682ee67e9cfec0e9
|
|
BLAKE2b-256 checksum How to use checksums |
e6cc8308b1c7aa3c25b70b7fb36726327b2807c7ab01e1d736efdd2f6c6b0f17
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 22, 2026.
Transparency logSecurity for purchase-history-parsers 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.
Attestation for purchase_history_parsers-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 22, 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.