forked from kncsolutions/dhelm-pnf-chart-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdhelm_chart_generator.py
28 lines (26 loc) · 1.07 KB
/
dhelm_chart_generator.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# -*- coding: utf-8 -*-
"""
**dhelm_chart_generator.py**
- Copyright (c) 2019, KNC Solutions Private Limited.
- License: 'Apache License, Version 2.0'.
- version: 1.0.0
"""
import datetime
import pandas as pd
import time
from PnfChartGen import Parameters
from PnfChartGen.PackageInstaller import install_packages
import subprocess
import sys
from PnfChartGen.Gen_Pnf_WIth_Quandl_Data import Gen_Pnf_With_Quandl_Data
from PnfChartGen.Gen_Pnf_With_Gfeed_Data import Gen_Pnf_With_Gfeed_Data
from PnfChartGen.Gen_Pnf_With_Zerodha_Kite_Data import Gen_Pnf_With_Zerodha_Kite_Data
install_packages.install()
settings = pd.read_excel('settings/data_source_credentials.xlsx')
data_source = settings.at[settings.first_valid_index(), 'data_source']
if Parameters.DataSource.GLOBAL_DATA_FEED in data_source or data_source == 1:
data = Gen_Pnf_With_Gfeed_Data()
elif Parameters.DataSource.QUANDL in data_source or data_source == 2:
data = Gen_Pnf_With_Quandl_Data()
elif Parameters.DataSource.ZERODHA in data_source or data_source == 3:
data = Gen_Pnf_With_Zerodha_Kite_Data()