RUVIDEO
Поделитесь видео 🙏

Create A Flask Web App And Connect SQL Database - Python Tutorial

THIS VIDEO CONTAINS A NOOB ERROR. One thing you definitely don't want to do is create a database connection every time you call the main page - its bad resource utilization and response times. I will be deleting and reposting this series. Consider a solution similar to the below - but you will need to add values to the db table.

from flask import Flask, render_template
from flask_sqlalchemy import SQLAlchemy

volApp = Flask(__name__)
# Configure SQLAlchemy
volApp.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///volApp.db'
db = SQLAlchemy(volApp)

class Volatility(db.Model):
__tablename__ = 'volTable'
# Define your table columns here

@volApp.route('/')
def createMain():
volatilityData = Volatility.query.all()
return render_template('index.html', volatilityData=volatilityData)

You can find all the code from the video on my Github below.
https://github.com/AdamGetbags/volatilityWebApp

Be sure to check out the previous videos if you haven't seen them yet.

How to set up VS Code and create a virtual environment.
https://youtu.be/AG4OUW33TIM

Creating a SQL database for your flask app
https://youtu.be/poBuRAuBoOc

Here's a SUPER HELPFUL article series on working with templates in Flask
https://www.digitalocean.com/community/tutorials/how-to-use-templates-in-a-flask-application

- - -

Subscribe to join our community and receive value on all things finance and technology!

If you love the content, buy me a coffee!
https://www.buymeacoffee.com/adamgetbags

Keep up with me!
https://www.instagram.com/damgetbags
https://twitter.com/damgetbags

- - -

Need some ideas for your project portfolio?

Check out how to get historical option price data in Python from the Polygon API.

https://youtu.be/87O9qxfMJ-g

Here's how to quickly get crypto data in Python from the CoinGecko API

https://youtu.be/4-CC3u4i73k

Here's how to create a SQL database from a Pandas DataFrame in Python

https://youtu.be/9IPlc-nKD1k

- - -

DISCLAIMER: The Information on Adam Getbags on Youtube.com is provided for education and informational purposes only, without any express or implied warranty of any kind, including warranties of accuracy, completeness, or fitness for any particular purpose. The Information contained in or provided from or through Adam Getbags on Youtube.com is not intended to be and does not constitute financial advice, investment recommendations, investment advice, trading advice, or any other advice. The Information on Adam Getbags on Youtube.com is general in nature and is not specific to you the User or anyone else. You should not make any decision, financial, investment, trading, or otherwise, based on any of The Information presented on Adam Getbags on Youtube.com without undertaking independent due diligence and consultation with a professional broker or financial advisory.

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Create A Flask Web App And Connect SQL Database - Python Tutorial», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.

Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!

Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.