/BhavCopy-Report-Analysis

A report in which csv extracted and parserd to JSON and loaded on REDIS(as primary DB and to Cache) and rendered by VUE.JS using DJANGO backend.

Primary LanguagePython

Linkedin: Shubham Nagure Twitter Follow

BSE BHAVCOPY DAILY REPORT

A report in which csv extracted and parserd to JSON and loaded on REDIS(as primary DB and to Cache) and rendered by VUE.JS using DJANGO backend.

REQUIREMENT :

Simple Python task: (Django + Vue + CSV export on UI).

BSE publishes a "Bhavcopy" (Equity) ZIP every day here: https://www.bseindia.com/markets/MarketInfo/BhavCopy.aspx

A standalone Python Django web app/server that will do following tasks:

  • Downloads the equity bhavcopy zip from the above page every day at 18:00 IST for the current date.
  • Extracts and parses the CSV file in it.
  • Writes the records into Redis with appropriate data structures (Fields: code, name, open, high, low, close).
  • Renders a simple VueJS frontend with a search box that allows the stored entries to be searched by name and renders a table of results and optionally downloads the results as CSV. Make this page look nice!
  • The search needs to be performed on the backend using Redis.

IMPLEMENTATION :

Standalone scripts

-getData.py -a script which extract the data from BSE site.

-insertoRedis.py -a script which insert data to REDIS.

-scheduler.py -scheduled above script 2 standalone scripts.

DJANGO APP

Django backed the application to retrive data from REDIS and convert to JSON Object and handover to frontend JS.

VUE.JS

VUE.JS render the table and serves to the template.

REDIS

Hash data structure is used and inserted list of dictionary, keys are "SC_NAME" and values are dictionary of respective row.

ADDITIONALY:

Django-Cache is used to cache the search keys on redis in order to improve the performance and user experience.

live demo

License

MIT

trackgit-views