Live data from Hacker News

SQLAlchemy 2.0 Released

sqlalchemy.org

11–20 of 84 posts

Re: SQLAlchemy 2.0 Released

#13
post #10
post #6

Sorry for detracting from the release news but SQLAlchemy has to have the least helpful website of any major library I can think of. I'm trying to find basic 101 code examples and it's just one wall of text after another. I found how to cite SQLAlchemy in a research paper and have yet to find a single code example.

Check out pugsql, we switched from SQLAlchemy to that because the former was overkill, and way too complex.

peewee is also pretty good

Re: SQLAlchemy 2.0 Released

#14
post #6

Sorry for detracting from the release news but SQLAlchemy has to have the least helpful website of any major library I can think of. I'm trying to find basic 101 code examples and it's just one wall of text after another. I found how to cite SQLAlchemy in a research paper and have yet to find a single code example.

Yes, that's probably my biggest complaint about the library. The docs are there but hard to navigate. Sometimes crucial tips are buried in an aside on one of the many pages that talk about the same topic. It's difficult to get started and it's also difficult to find the ultimate explanation of what's going on.

Re: SQLAlchemy 2.0 Released

#16
post #6

Sorry for detracting from the release news but SQLAlchemy has to have the least helpful website of any major library I can think of. I'm trying to find basic 101 code examples and it's just one wall of text after another. I found how to cite SQLAlchemy in a research paper and have yet to find a single code example.

I miss ActiveModel and ActiveRecord so much (after recently switching jobs to a python shop), docs, api etc were just so polished and battle hardened (yes they have their problems, but I was pretty proficient in using them well)

Re: SQLAlchemy 2.0 Released

#17
post #6

Sorry for detracting from the release news but SQLAlchemy has to have the least helpful website of any major library I can think of. I'm trying to find basic 101 code examples and it's just one wall of text after another. I found how to cite SQLAlchemy in a research paper and have yet to find a single code example.

When I see such a poor website, I also expect the codebase to be clunky and cluttered.

Better alternative: - https://pugsql.org/

Re: SQLAlchemy 2.0 Released

#18
post #7

I was just working on sqlalchemy. zzzeek's help if you get stuck somewhere is outstanding. Async is a godsent feature for us.

Out of curiosity, what's the benefit of async for you?

Async sqlalchemy is required if we want to use an async appserver(tornado). We can serve a lot more requests per second with async. Otherwise, tornado was sync and could only serve one request synchronously at one time.

Re: SQLAlchemy 2.0 Released

#19
I would urge people who have had issues with the documentation to give the 2.0 documentation a try. Many aspects of it have been completely rewritten, both to correctly describe things in terms of the new APIs as well as to modernize a lot of old documentation that was written many years ago.

First off, SQLAlchemy's docs are pretty easy to get to, for a direct link just go to:

https://docs.sqlalchemy.org/

It's an esoteric URL I know! ;)

from there, docs that are new include:

- the Quickstart, so one can see in one quick page what SQLAlchemy usually looks like: https://docs.sqlalchemy.org/en/20/orm/quickstart.html

- the Unified Tutorial, which is a dive into basically every important concept across Core / ORM : https://docs.sqlalchemy.org/en/20/tutorial/index.html

- the ORM Querying guide, which is a "how to" for a full range of SQL generation: https://docs.sqlalchemy.org/en/20/orm/queryguide/index.html

it's still a lot to read of course but part of the idea of SQLAlchemy 2.0 was to create a straighter and more consistent narrative, while it continues to take on a very broad-based problem space. If you compare the docs to those of like, PostgreSQL or MySQL, those docs have a lot of sections and text too (vastly more). It's a big library.

Re: SQLAlchemy 2.0 Released

#20
post #11

I learned the hard way that I need to always use SQLAlchemy. I used other Python ORMs before and has been bitten hard with random bugs.

Yeah, ORMs are ten thousand edge cases, it really lays to use a battle hardened one that has been lovingly maintained and improved constantly for over a decade.

Hats off to Mike, most projects that are this age are decrepit and you have kept it fresh.

Post reply on HN