Skip to main content

FXMacroData for Delta Lake

Load FXMacroData public responses into Delta Lake tables with the official deltalake Python package (delta-rs). Store macro announcements, calendars, FX and positioning data next to your own lakehouse tables while retaining the source payload and revision metadata.

FXMacroData documentation

Install

Requires Python 3.10 or later and deltalake 1.6.6 or later. Install this package and its adjacent public client dependencies from the distribution supplied to you:

python -m pip install /path/to/fxmacrodata-public-client /path/to/fxmacrodata-platform-core /path/to/deltalake-fxmacrodata

Example

USD data is available without a key:

from fxmacrodata_platform_core import read
from fxmacrodata_deltalake import merge_load

batch = read("indicator_history", {"currency": "usd", "indicator": "policy_rate"})
result = merge_load(batch, "./lake/fxmacrodata")
print(result.rows, "envelopes submitted in", result.batches, "blocks")

Any object-store location accepted by deltalake works, for example s3://bucket/fxmacrodata or abfss://container@account.dfs.core.windows.net/fxmacrodata. Pass the store's own settings through storage_options; they are handed to deltalake untouched and are never logged.

Credentials

Set FXMD_API_KEY in your environment or secret manager and pass its name to read (or to load_operation) through api_key_env. Omit it for anonymous access. Destination credentials belong to your object store configuration, never to this package.

Data semantics

Columns are operation, source_url, record_id, currency, indicator, date, announcement_datetime, value, value_text, record_json, response_json and the loader's content_hash. Only value is numeric (nullable float64); every other column is a nullable string. record_json retains the original record and response_json retains the complete response, including pagination and metadata. An empty response produces one envelope row with record_json = 'null', so absence of data and the server's metadata remain inspectable; it is not an observation. Dates and announcement times remain source strings. No publication time is inferred and no missing value is filled. content_hash is the SHA-256 of the canonical JSON of the ten source columns. Writes use schema_mode="merge", so additive columns in future versions never break an existing table.

Delivery guarantee

load appends bounded blocks of batch_size rows (1 to 10,000). It is at-least-once: a repeated load produces duplicate rows, and a failed block is never retried automatically; earlier blocks may already be committed.

merge_load is idempotent. It runs a Delta MERGE keyed on operation, record_id and content_hash with WHEN NOT MATCHED THEN INSERT, so retrying the same source batch adds nothing. Changed record data or response metadata yields a new content_hash and is retained as a new row with the same record_id; query the latest hash per record for a current view.

load_operation reads one operation and loads it in one call. It accepts api_key_env, complete_history, max_pages and client_factory for the public reader; max_pages bounds history pagination, and an incomplete read raises before the destination is touched.

Development

Run the offline tests with python -m pytest tests -q. They write to a local temporary Delta table and never call the live service or a remote store.

Metadata

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

Built distribution (wheel)

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

Total release size: 14.9 kB

Release files / deltalake_fxmacrodata-0.1.0.tar.gz

Download URL deltalake_fxmacrodata-0.1.0.tar.gz
Size 8.2 kB
Tags Source
SHA-256 checksum
How to use checksums
fe88e37a7955789c1632d48a09b923242452589f3b1601cb1f9fd1575244dc5b
BLAKE2b-256 checksum
How to use checksums
c2cdfb28d435941a001c0c8a50188e92efc69a617913e526ef32014358a2eb8f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via FXMacroData-PackagePublisher/1.0

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

Download URL deltalake_fxmacrodata-0.1.0-py3-none-any.whl
Size 6.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6ea43db4cebe428ddc5e1673c14b64ada6f8ee426e29be03010096a79b74d445
BLAKE2b-256 checksum
How to use checksums
1ab294de275efe00d410295692b4f4e857acf6bbf1a93d01c175731abb4695f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via FXMacroData-PackagePublisher/1.0

Security for deltalake-fxmacrodata 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