Metadata-Version: 2.1
Name: oafabrik
Version: 0.7.0
Summary: A Python SDK for Fabrik
Home-page: https://github.com/openaristos/pyfabrik
Author: Aristos Data, LLC.
Author-email: hello@openaristos.io
License: AGPLv3
Keywords: openaristos,fabrik
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Healthcare Industry
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Telecommunications Industry
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Description-Content-Type: text/markdown
Requires-Dist: pydantic
Requires-Dist: s3fs
Requires-Dist: pandas
Requires-Dist: requests
Requires-Dist: pyarrow

# pyfabrik

`pyfabrik` is a simple library created to interface with Fabrik, the data access layer component of `OpenAristos`.

## Installation

Use 

```bash
pip install oafabrik
```

## Usage

```python
import os

from pyfabrik.client import FabrikClient
from pyfabrik.data import DefaultDataFrameFacade
from pyfabrik.models import FabrikReadRequest, FabrikReadResponse

client = FabrikClient(
    endpoint=os.getenv("FABRIK_HOST"),
    token=os.getenv("FABRIK_JWT_TOKEN"),
    df_facade=DefaultDataFrameFacade(),
)

query: str = "index:ix[msci_benchmark_code='701431']>index_has_constituent>.effective.instrument_region:ir[]@axioma:a axioma.axww4_attribution_security.by_instrument_region[a,ir,price,effective_dt] e 2015-01-01 2015-02-01 b"

r: FabrikReadRequest = FabrikReadRequest(
    definition=query,
    warehouse="redshift",
)

res: FabrikReadResponse = client.read(r)
res.df.show()
```

## License
[AGPLV3](https://choosealicense.com/licenses/agpl-3.0/)


