Skip to main content

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_confirmed and a stale flag. A value we cannot verify is null with a note, never a guess.

  • Invalid input is rejected for free, before any payment. A bad parameter raises InvalidRequest carrying 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 PaymentRequired naming 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.

Metadata

Release files for zaref 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 zaref 0.1.0
File Size Uploaded Provenance Actions
zaref-0.1.0.tar.gz 13.6 kB Without provenance Details for zaref-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 20.7 kB

Release files / zaref-0.1.0.tar.gz

Download URL zaref-0.1.0.tar.gz
Size 13.6 kB
Tags Source
SHA-256 checksum
How to use checksums
fe86eb39a1d3e9378e31d8725b0a3f347dda178c580a5960971c79facaa0d787
BLAKE2b-256 checksum
How to use checksums
30715f7db1e04601a90158473385cdd82a3c8f155ddaa48b55c7761910f6955a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

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

Download URL zaref-0.1.0-py3-none-any.whl
Size 7.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0b9cab962ff9c4a1f8fba3c7be9e25ff92ce8c734a71a01bce61dffbbccdea86
BLAKE2b-256 checksum
How to use checksums
f08f60eed53b31e7153e03b5cde6d08cc7eba7dbc2aec521857499187ca96094
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Security for zaref 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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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