SQLAlchemy 2.0 on Talk Python to Me Ep.344

  Рет қаралды 12,348

Talk Python

Talk Python

Күн бұрын

Пікірлер: 8
@andru5054
@andru5054 Жыл бұрын
Awesome video thank you!
@symosys
@symosys 3 жыл бұрын
Will be interesting to see your results on the GC and timing between MongoDB and SQL Alchemy
@talkpython
@talkpython 3 жыл бұрын
Hey Paul. I put together a project to test this. If you query 20k records in SQLAlchemy, it will result in, wait for it, 1,890 GCs!!!! Just while it's returning the results. MongoDB is slightly better at 500. Still insane. Here's the report and app: github.com/mikeckennedy/pythons-gc-and-orms
@lukasjuhrich503
@lukasjuhrich503 2 жыл бұрын
Regarding the discussion at ~14:20: I added such annotations as well for a while, but the shortcoming of that is that the typing becomes i correct when using e.g. User.name as a class variable when writing nontrivial queries. E.g. User.name.desc() as a sort qualifier would be marked as a warning, and this becomes annoying after a while. I think this is solved on a mypy level nowadays with the sqlalchemy typing layer, but unfortunately PyCharm has its own implementation of the whole typing business which is not able to handle the distinction yet. EDIT: ah, yes, they're talking about that a few seconds later. Consider my remarks redundant :)
@mikeckennedy
@mikeckennedy 2 жыл бұрын
It's not perfect. I do find I use the attributes in code rather than queries more so I lean on the type definitions in that regard. You're right that .desc() and friends fails but that is not a super common use-case for me. Python has typing like int|float. I might explore using int|sa.Column for an integer column. That would work for both I *think* :)
@iamworstgamer
@iamworstgamer Жыл бұрын
well, it has good performance, may be one of the best, but it sucks, its so complex for simple things,
@gnatinator
@gnatinator 2 жыл бұрын
16:20 oh god...we're ruining python
@Superdooperhero
@Superdooperhero 3 жыл бұрын
Sadly still no us to me. All SQL results should be as of a date and time as per real life.
Moving Beyond Flat Files in Python With SQLAlchemy and SQLite
35:23
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.
Support each other🤝
00:31
ISSEI / いっせい
Рет қаралды 81 МЛН
Леон киллер и Оля Полякова 😹
00:42
Канал Смеха
Рет қаралды 4,7 МЛН
“Don’t stop the chances.”
00:44
ISSEI / いっせい
Рет қаралды 62 МЛН
DuckDB and Python: Ducks and Snakes living together
1:03:28
Talk Python
Рет қаралды 796
"SQLAlchemy 2.0 - The One-Point-Four-Ening 2021" by: Mike Bayer
2:44:39
TUTORIAL: SQLAlchemy 2.0
1:44:25
Six Feet Up
Рет қаралды 25 М.
Pre-commit Hooks for Python Devs - Talk Python to Me Ep.482
1:10:03
SQLModel + FastAPI: Say Goodbye to Repetitive Database Code
19:50
Microservices are Technical Debt
31:59
NeetCodeIO
Рет қаралды 693 М.
#01 - Relational Model & Algebra (CMU Intro to Database Systems)
1:23:38
CMU Database Group
Рет қаралды 23 М.
Evolution of software architecture with the co-creator of UML (Grady Booch)
1:30:43
The Pragmatic Engineer
Рет қаралды 54 М.
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.