SQLAlchemy Turns Python Objects Into Database Entries

preview_player
Показать описание
Today we learn about SQLAlchemy, which is an SQL Toolkit and ORM that allows us to map Python classes to database tables.

◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾
📚 Programming Books & Merch 📚

🌐 Social Media & Contact 🌐

Рекомендации по теме
Комментарии
Автор

One of the imports used is deprecated. For SQLAlchemy 2.0.10 the import for the declarative_base needs to look like this:
from sqlalchemy.orm import declarative_base

radio_electronics
Автор

Very clean and easy to understand, thanks for the video.

Just a small hint: at 18:51 you couldn't see the table, bc the database windows won't refresh automatically in PyCharm. You have to click the refresh button at the top of the panel (third symbol in ur case). Then it will show the additionally created tables.

dustinrolsander
Автор

One of the best channels in youtube! Thanks for your work!!!

kharutyunyan
Автор

Ive watched this video many times! Brilliant tutorial on using SQLAlchemy to abstract SQL from python. I also loved your CLASSES video! Its helped me develop my code so much faster. Cheers dude!"

roguebt
Автор

Very great article. Short, distinct on the point - Thank you!

rpf
Автор

Nicely done. Simple and effective example that immediately clarified proper structure.

reginaldmaisonneuve
Автор

Thanks! Very clear, easy to follow, learned enough to get me started!

stevekruger
Автор

Thank you very much for the help! :^)

At 14:00 you could also use
results = == "Smith").all()
with the .all() at the end you select every element fitting to the filter!

bundesdavid
Автор

Great video! I currently create and update SQL rows by calling stored procedures. I want to give SQLAlchemy a try.

ootbinc
Автор

Clear and informative video. I have just started to learn orm and sqlalchemy and this video is superb. Thanks for sharing.

juliusokwe
Автор

This has been an awesome tutorial TY, I learned enough to continue my project !
Geatings from colombia !

andymandrill
Автор

This is a treasure!
Thank you so much!

ThatGuyEster
Автор

this video has saved me a lot of time. thanks for your work :*

aleksalukic
Автор

Hey man solid video, but should add a note that you are, in fact, using the legacy (albeit backward compatible) syntax here. Mapped_column() is now the new factory function for the Column() class

benshapiro
Автор

Excellent tutorial. Thank you for the content.

nujanai
Автор

really great session, everything is clear and easy to understand. thank you...

sandhiyasuresh
Автор

1:09 this is exactly what I was looking for. THANK YOU!

Cire-myur
Автор

In the last query execution it results out the object of respective classes. In the iteration of the loop, print(r) displayed both classes __repr__ method string format

sivajyothichandra
Автор

Isn‘t the use of Column legacy? I know this video is 8 months old. I think a better way is to use: first_name: Mapped[str] = mapped_column(String, nullable=True)…. If the information are optional one can use Optional from the typing library

janHodle
Автор

Another great video. You are such a good teacher, while your style of explaining things seems so effortless.

Troteos