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
Metadata
Release files for oafabrik 0.9.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| oafabrik-0.9.0.tar.gz | 4.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| oafabrik-0.9.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.8 kB
Release files / oafabrik-0.9.0.tar.gz
| Download URL | oafabrik-0.9.0.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8b77bf4b212080b18f8bf15d06d2cc8caa4cfa4591b31d99041a91526cf1e099
|
|
BLAKE2b-256 checksum How to use checksums |
b33a0d74e58b9e602ee47c1b3cbfe1d0fd7d4e498a84f8714dd4cb78a35bd6eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / oafabrik-0.9.0-py3-none-any.whl
| Download URL | oafabrik-0.9.0-py3-none-any.whl |
|---|---|
| Size | 4.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0b7b407fb9acfa687f700e2aa97e113fe572d9afcfe28a9b65865efa6c7cf140
|
|
BLAKE2b-256 checksum How to use checksums |
31f66c9d97d71a07781d941e65840c631085fa70b5258487cced8638a63ff173
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|