South African reference data for Python: verified, cited, pay-per-call. No API key.
Project description
zaref
South African reference data for Python. Repo rate, fuel prices, tax tables, ZARONIA, FX, bond yields, wages, grants, plus calculators. Verified daily against the official sources, cited on every response, paid per call in USDC. No API key, no signup, no monthly plan.
pip install zaref
Try it with no wallet
The catalog, public holidays and the VAT calculator are free and need nothing set up:
from zaref import Zaref
z = Zaref()
z.public_holidays() # every SA public holiday this year
z.vat(amount=1000) # add VAT at the current rate
z.list_series() # everything available
Paid endpoints
Everything else costs a fraction of a cent, paid automatically over the x402 protocol with a Base wallet funded with USDC. No account, no key: payment is the authentication.
pip install "zaref[pay]"
from zaref import Zaref
z = Zaref(private_key="0x...") # or set ZAREF_PRIVATE_KEY
z.repo_rate() # 7.0
z.series("fuel-prices") # cited JSON with source_url + effective_date
z.income_tax(annual=480000) # composed from the current SARS tables
z.batch(["repo-prime", "vat", "cpi", "fuel-prices"]) # four series, one payment
z.changes(since="2026-07-01") # what moved, before you re-fetch
Every paid call returns in about two seconds. A call costs less than the tokens an agent would burn finding and parsing the official source itself.
Honest by construction
-
Every response carries
source_url,effective_date,last_confirmedand astaleflag. A value we cannot verify isnullwith a note, never a guess. -
Invalid input is rejected for free, before any payment. A bad parameter raises
InvalidRequestcarrying the accepted values, and costs nothing:from zaref import Zaref, InvalidRequest try: Zaref(private_key="0x...").calc("cgt", gain=100000, type="bogus") except InvalidRequest as e: print(e.accepted_values) # ['individual', 'company', 'trust']
-
A paid call without a wallet raises
PaymentRequirednaming the endpoint and price, not a stack trace.
What's covered
33 verified series, 29 calculators, task-shaped answers (payroll, wage checks, working days), two live feeds (government tenders, crypto ZAR prices), history with point-in-time as_at, a batch endpoint and change-alert webhooks. Full list: z.catalog() or https://zaref.dev/docs.
Disclaimer
Independent data service, not affiliated with any South African government entity. Every value carries its official source; verify against the source for legal or financial use.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zaref-0.1.0.tar.gz.
File metadata
- Download URL: zaref-0.1.0.tar.gz
- Upload date:
- Size: 13.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe86eb39a1d3e9378e31d8725b0a3f347dda178c580a5960971c79facaa0d787
|
|
| MD5 |
bd37685500fc1a6d1e21f4d003e8fbe9
|
|
| BLAKE2b-256 |
30715f7db1e04601a90158473385cdd82a3c8f155ddaa48b55c7761910f6955a
|
File details
Details for the file zaref-0.1.0-py3-none-any.whl.
File metadata
- Download URL: zaref-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b9cab962ff9c4a1f8fba3c7be9e25ff92ce8c734a71a01bce61dffbbccdea86
|
|
| MD5 |
47fa0f77052b27157e442365bd03f62c
|
|
| BLAKE2b-256 |
f08f60eed53b31e7153e03b5cde6d08cc7eba7dbc2aec521857499187ca96094
|