A Python SDK for Fabrik
Project description
pyfabrik
pyfabrik is a simple library created to interface with Fabrik, the data access layer component of OpenAristos.
Installation
Use
pip install oafabrik
Usage
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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
oafabrik-0.9.0.tar.gz
(4.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file oafabrik-0.9.0.tar.gz.
File metadata
- Download URL: oafabrik-0.9.0.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8b77bf4b212080b18f8bf15d06d2cc8caa4cfa4591b31d99041a91526cf1e099
|
|
| MD5 |
f7796f330ce87c68cbe4eec2e070878e
|
|
| BLAKE2b-256 |
b33a0d74e58b9e602ee47c1b3cbfe1d0fd7d4e498a84f8714dd4cb78a35bd6eb
|
File details
Details for the file oafabrik-0.9.0-py3-none-any.whl.
File metadata
- Download URL: oafabrik-0.9.0-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b7b407fb9acfa687f700e2aa97e113fe572d9afcfe28a9b65865efa6c7cf140
|
|
| MD5 |
edc666d47b5aa8484275c0461fd4e42b
|
|
| BLAKE2b-256 |
31f66c9d97d71a07781d941e65840c631085fa70b5258487cced8638a63ff173
|