Metadata-Version: 2.4
Name: fabric-fxmacrodata
Version: 0.1.0
Summary: FXMacroData notebook and pipeline definitions for Microsoft Fabric
License: MIT License
        
        Copyright (c) 2026 Robert Tidball
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://fxmacrodata.com/?utm_source=pypi&utm_medium=referral&utm_campaign=fabric-fxmacrodata&utm_content=package
Project-URL: Documentation, https://fxmacrodata.com/documentation/reference?utm_source=pypi&utm_medium=referral&utm_campaign=fabric-fxmacrodata&utm_content=package
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: fxmacrodata-platform-core==0.1.0
Dynamic: license-file

# FXMacroData for Microsoft Fabric and Data Factory

This package supplies native Fabric notebook and DataPipeline item definitions plus a PySpark Delta loader. It calls all 33 public REST operations and 54 MCP tools through the shared operation catalogue. Use your own Fabric workspace, Lakehouse and environment libraries.

Install the public client, platform core and this wheel into the notebook environment. Attach a Lakehouse. Build item definitions locally:

```python
import json
from fabric_fxmacrodata import notebook_item, pipeline_item
notebook = notebook_item("release_calendar", {"currency":"usd"}, "fxmacrodata_release_calendar")
with open("notebook-item.json", "w") as output:
    json.dump(notebook, output)
# After creating the notebook, use your real workspace and notebook UUIDs:
# pipeline = pipeline_item(workspace_id, notebook_id)
```

Create the notebook through Fabric's [Create item with definition](https://learn.microsoft.com/en-us/rest/api/fabric/articles/item-management/definitions/notebook-definition?utm_source=pypi&utm_medium=referral&utm_campaign=fabric-fxmacrodata&utm_content=upstream-reference) API or import the decoded ipynb file in the workspace UI. Build the pipeline after the notebook exists, using its UUID. The [DataPipeline definition](https://learn.microsoft.com/en-us/rest/api/fabric/articles/item-management/definitions/datapipeline-definition?utm_source=pypi&utm_medium=referral&utm_campaign=fabric-fxmacrodata&utm_content=upstream-reference) contains a native notebook activity. Item builders only return JSON; they do not create, upload or run workspace resources.

For Azure Data Factory, import the decoded notebook into Synapse and install the same libraries in its Spark pool. `adf_pipeline(notebook_name, linked_service_name, spark_pool)` returns a native `SynapseNotebook` pipeline definition referencing your existing AzureSynapseArtifacts linked service and Spark pool. Configure that linked service with your managed identity in ADF Studio, grant the required workspace permissions, then import the pipeline JSON. See [Microsoft's notebook activity documentation](https://learn.microsoft.com/en-us/azure/synapse-analytics/synapse-notebook-activity?utm_source=pypi&utm_medium=referral&utm_campaign=fabric-fxmacrodata&utm_content=upstream-reference). Tenant connections, authentication and schedules remain workspace configuration. This package is not an ADF marketplace listing.

`load_delta` reads the complete requested snapshot before replacing the destination Delta table. Use one table for each operation/argument configuration. An unsuccessful read leaves the table untouched. Retry repeats the full snapshot; no synthetic incremental checkpoint or release time is introduced. `record_json` retains original fields; `response_json` retains access limits, provenance and metadata. Empty responses retain a metadata row with `record_json="null"`. Keep that row out of observation counts.

Set `api_key_env` to a variable name supplied at runtime through your tenant's supported secret configuration. The key is never embedded in the notebook or pipeline definition. Default access is anonymous; published USD delay/history limits apply. Protected datasets require a suitable subscription. Data-use and redistribution rights remain dataset-specific.
