4 ms·
I often use the Dataset library (from Mozilla, I believe). It provides a lot of convenience for incorporating SQLite (and other databases) into Python projects
by nrjames 9y ago
I often use the Dataset library (from Mozilla, I believe). It provides a lot of convenience for incorporating SQLite (and other databases) into Python projects and it's very easy to use it to fall back to straight SQL queries and other statements.
https://dataset.readthedocs.io/en/latest/ https://dataset.readthedocs.io/en/latest/
- jgalt212 9y agoDataset is neat, but it relies on the monster that is sqlalchemy. I have recently been using Pony ORM for new experiments with sqlite, and then if the project sticks data transfer to MySQL, et is trivial. Pony is not a light as Dataset, but way less heavy/confusing than sqlalchemy.
- StavrosK 9y agoI agree, but Pony is also less flexible than SQLAlchemy :/ For anything other than trivial queries, you'll end up writing some horrible code. Having used Pony for a month or so, it feels like someone saw generators, thought SELECTs would be cool using them, and then implemented all other query types as well instead of shelving the whole thing like they should have.
- jboynyc 9y agoKenneth Reitz's records library is similar (and also reliant on Sqlalchemy): https://github.com/kennethreitz/records https://github.com/kennethreitz/records