Skip to content

please suggest an ORM/db layer #2

@sandys

Description

@sandys

coming from HN (https://news.ycombinator.com/item?id=11634152 and https://news.ycombinator.com/item?id=11632650)

Could you please include something like aiopg in your setup instructions - not as a requirement, but as a recommendation. Too many of us are using something like Flask with postgres and we would love to try Growler out.

But the world of Python ORMs is problematic when it comes to asyncio compatible libraries. This includes mysql, postgresql and redis - three of the biggest ones which pretty much everyone uses.

As someone else put it on HN - https://news.ycombinator.com/item?id=11629444

One problem with this is that the entire ecosystem has to get on board with async. Maybe a new framework would make it compelling enough, who knows.
This was/is the big issue with Tornado, IMO (and Tornado has been around for ages in framework time). Tornado is only async if the entire call stack all the way down to the http socket is async, using callbacks instead of returning values. This means that any 3rd party client library you use has to be completely written asynchronously, and none are in python. So you end up with a lot tedious work re-implementing http client libraries for Twilio or Stripe or whatever you're using.
I'm curious to see where asyncio goes in python, but I'm a bit skeptical after seeing how much of a pain it was to use Tornado on a large web app. In the meantime I'll be using Gevent + Flask, which isn't perfect since it adds some magic & complexity but has the huge upside of letting you keep using all the libraries you're used to.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions