this post was submitted on 18 Jul 2023
13 points (100.0% liked)

Python

6288 readers
3 users here now

Welcome to the Python community on the programming.dev Lemmy instance!

๐Ÿ“… Events

PastNovember 2023

October 2023

July 2023

August 2023

September 2023

๐Ÿ Python project:
๐Ÿ’“ Python Community:
โœจ Python Ecosystem:
๐ŸŒŒ Fediverse
Communities
Projects
Feeds

founded 1 year ago
MODERATORS
13
Python SQLite Recipe (constvoidblog.wordpress.com)
submitted 1 year ago by [email protected] to c/python
 

A copy/pastable Db class to help people get started on using SQLite in python!

top 2 comments
sorted by: hot top controversial new old
[โ€“] thicket 2 points 1 year ago (1 children)

If you're going to use SQLite regularly, you'll need some extra infrastructure. OP's post provides some boilerplate that would help you on your way.

What has really made the difference for me recently though, is Simon Willison's sqlite_utils package. It's heavier weight than OP's wrapper classes, but it's infinitely more powerful and has made using a local database a joy instead of the kludge I usually make of it. I'll be bummed to writing stuff for PostGres when I have to do that

[โ€“] [email protected] 1 points 1 year ago

That is a very decent lib! It seems pretty mature and strikes a nice balance between ease of use and performant power.

sqlite_utils is the missing command line, in many ways

SQLite is an underused platform imo. More RDBMS would benefit from using it as an import / export format vs csv / json.