Metadata-Version: 2.4
Name: metapyle
Version: 0.1.4
Summary: Early-stage unified interface for querying financial time-series data
Project-URL: Homepage, https://github.com/stabilefrisur/metapyle
Project-URL: Repository, https://github.com/stabilefrisur/metapyle
Project-URL: Documentation, https://github.com/stabilefrisur/metapyle#readme
Project-URL: Issues, https://github.com/stabilefrisur/metapyle/issues
Project-URL: Changelog, https://github.com/stabilefrisur/metapyle/blob/master/CHANGELOG.md
Author-email: Stabile Frisur <26568863+stabilefrisur@users.noreply.github.com>
License: MIT License
        
        Copyright (c) 2025 Stabile Frisur
        
        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.
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Office/Business :: Financial
Classifier: Typing :: Typed
Requires-Python: >=3.12
Requires-Dist: gs-quant>=1.4.67
Requires-Dist: macrobond-data-api>=3.0.4
Requires-Dist: pandas>=2.0.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: xbbg==0.7.10
Description-Content-Type: text/markdown

# Metapyle

[![PyPI](https://img.shields.io/pypi/v/metapyle)](https://pypi.org/project/metapyle/)
[![Python](https://img.shields.io/pypi/pyversions/metapyle)](https://pypi.org/project/metapyle/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)

> **Early-stage research framework** — Not for production use.

A unified interface for querying financial time-series data from multiple sources.

## Overview

Financial data lives in many places—Bloomberg terminals, internal APIs, CSV exports—each with its own ticker syntax, authentication, and quirks. Metapyle provides a YAML-based catalog that maps human-readable names to source-specific details, giving you a single `client.get()` interface regardless of where the data comes from.

Currently supports Bloomberg (via xbbg), Macrobond (via macrobond-data-api), GS Marquee (via gs-quant), and local files (CSV/Parquet).

## Installation

```bash
uv add metapyle
```

Or with pip:

```bash
pip install metapyle
```

> **Note:** Bloomberg requires a Bloomberg Terminal. GS Quant requires GS Marquee access. Macrobond requires the desktop app or Web API credentials.

## Quick Start

**1. Create a catalog file (`catalog.yaml`):**

```yaml
# Bloomberg
- my_name: sp500_close
  source: bloomberg
  symbol: SPX Index
  field: PX_LAST

# Macrobond
- my_name: us_gdp
  source: macrobond
  symbol: usnaac0169

# GS Quant
- my_name: eurusd_vol
  source: gsquant
  symbol: EURUSD
  field: FXIMPLIEDVOL::impliedVolatility
  params:
    tenor: 1m
    deltaStrike: DN

# Local file
- my_name: gdp_forecast
  source: localfile
  symbol: GDP_FORECAST    # column name in the file
  path: /data/macro.csv   # file path
```

**2. Query data:**

```python
from metapyle import Client

with Client(catalog="catalog.yaml") as client:
    # end defaults to today
    df = client.get(["sp500_close", "us_gdp"], start="2024-01-01")
```

## Documentation

See the [User Guide](docs/user-guide.md) for complete documentation, including:

- Catalog configuration
- Creating catalogs from CSV
- Frequency alignment
- Caching
- Macrobond unified series (server-side alignment)
- Available data sources
- Error handling

For low-level API examples showing what metapyle abstracts, see [Raw API Examples](docs/raw-api-examples.md).

## License

MIT License - see [LICENSE](LICENSE) for details.
