Warning
Work in progress, not production ready, poor documentation :)
Demo of using Tradingview's lightweight charts implemented in a Flask web project. Using Hard coded json data defined in routes.py file.
Checkout the project wiki for in depth explanations.
This installation process uses pyproject.toml instead of a requirements.txt file.
Open a powershell console and type:
> python --version
> git clone https://github.com/MapleFrogStudio/tradingviewwithflask.git
> cd tradingviewwithflask
> python -m venv env
> .\env\Scripts\Activate
> python -m pip install --upgrade pip
> pip install -e .
Also a good practice is to setup some environment variables to secure Flask. At the root of the project create a file named .env and add the following lines:
SECRET_KEY=somerandomstring
FLASK_ENV=development
FLASK_DEBUG=True
In the same Powershell console type:
py run.py
You will see a message similar to this

CTRL-Click on the http://127.0.0.1:5000 to open the default page in your web browser. Follow the link to see a hard coded chart!
The index page: shows the data structure required for candlestick charts
The /demo page: shows a simple chart with fake data
The /chart page: show the chat view page with actual prices from Yahoo finance