eshan6704 commited on
Commit
c8a3e36
·
verified ·
1 Parent(s): 289f332

Update app/app.py

Browse files
Files changed (1) hide show
  1. app/app.py +13 -12
app/app.py CHANGED
@@ -17,6 +17,7 @@ from . import preopen_html
17
  from . import eq_html
18
  from . import bhavcopy_html
19
  from . import build_nse_fno
 
20
 
21
  # External libs (installed via requirements.txt)
22
  #import nsepython as nse
@@ -96,7 +97,7 @@ def handle_stock(req: FetchRequest):
96
  if t == "other":
97
  return common.wrap(stock.fetch_other(req.name))
98
  if t == "stock_hist":
99
- return nsepython.nse_stock_hist(
100
  req.date_start, req.date_end, req.name
101
  ).to_html()
102
 
@@ -117,37 +118,37 @@ def handle_index(req: FetchRequest):
117
  if t == "nse_fno":
118
  return build_nse_fno.nse_fno_html(req.date_end, req.name)
119
  if t == "nse_fiidii":
120
- return nsepython.nse_fiidii().to_html()
121
  if t == "nse_events":
122
- return nsepython.nse_events().to_html()
123
  if t == "nse_future":
124
  return common.wrap(nsepython.nse_future(req.name))
125
  if t == "nse_highlow":
126
- return nsepython.nse_highlow(req.date_end).to_html()
127
  if t == "stock_highlow":
128
- return nsepython.stock_highlow(req.date_end).to_html()
129
  if t == "nse_bhav":
130
  return bhavcopy_html.build_bhavcopy_html(req.date_end)
131
  if t == "nse_largedeals":
132
- return nsepython.nse_largedeals().to_html()
133
  if t == "nse_bulkdeals":
134
- return nsepython.nse_bulkdeals().to_html()
135
  if t == "nse_blockdeals":
136
- return nsepython.nse_blockdeals().to_html()
137
  if t == "nse_most_active":
138
  return nsepython.nse_most_active().to_html()
139
  if t == "index_history":
140
- return nsepython.index_history("NIFTY", req.date_start, req.date_end).to_html()
141
  if t == "largedeals_historical":
142
- return nsepython.nse_largedeals_historical(
143
  req.date_start, req.date_end
144
  ).to_html()
145
  if t == "index_pe_pb_div":
146
- return nsepython.index_pe_pb_div(
147
  "NIFTY", req.date_start, req.date_end
148
  ).to_html()
149
  if t == "index_total_returns":
150
- return nsepython.index_total_returns(
151
  "NIFTY", req.date_start, req.date_end
152
  ).to_html()
153
 
 
17
  from . import eq_html
18
  from . import bhavcopy_html
19
  from . import build_nse_fno
20
+ from . import nsepythonmofied
21
 
22
  # External libs (installed via requirements.txt)
23
  #import nsepython as nse
 
97
  if t == "other":
98
  return common.wrap(stock.fetch_other(req.name))
99
  if t == "stock_hist":
100
+ return nsepythonmodied.nse_stock_hist(
101
  req.date_start, req.date_end, req.name
102
  ).to_html()
103
 
 
118
  if t == "nse_fno":
119
  return build_nse_fno.nse_fno_html(req.date_end, req.name)
120
  if t == "nse_fiidii":
121
+ return nsepythonmodied.nse_fiidii().to_html()
122
  if t == "nse_events":
123
+ return nsepythonmodied.nse_events().to_html()
124
  if t == "nse_future":
125
  return common.wrap(nsepython.nse_future(req.name))
126
  if t == "nse_highlow":
127
+ return nsepythonmodied.nse_highlow(req.date_end).to_html()
128
  if t == "stock_highlow":
129
+ return nsepythonmodied.stock_highlow(req.date_end).to_html()
130
  if t == "nse_bhav":
131
  return bhavcopy_html.build_bhavcopy_html(req.date_end)
132
  if t == "nse_largedeals":
133
+ return nsepythonmodied.nse_largedeals().to_html()
134
  if t == "nse_bulkdeals":
135
+ return nsepythonmodied.nse_bulkdeals().to_html()
136
  if t == "nse_blockdeals":
137
+ return nsepythonmodied.nse_blockdeals().to_html()
138
  if t == "nse_most_active":
139
  return nsepython.nse_most_active().to_html()
140
  if t == "index_history":
141
+ return nsepythonmodied.index_history("NIFTY", req.date_start, req.date_end).to_html()
142
  if t == "largedeals_historical":
143
+ return nsepythonmodied.nse_largedeals_historical(
144
  req.date_start, req.date_end
145
  ).to_html()
146
  if t == "index_pe_pb_div":
147
+ return nsepythonmodied.index_pe_pb_div(
148
  "NIFTY", req.date_start, req.date_end
149
  ).to_html()
150
  if t == "index_total_returns":
151
+ return nsepythonmodied.index_total_returns(
152
  "NIFTY", req.date_start, req.date_end
153
  ).to_html()
154