SQLite is an open source relational database included with the Python standard library as of Python 2.5. The pysqlite database driver is also included with the standard library so that no further external dependencies are required to access a SQLite database from within Python applications.

SQLite logo.

SQLite is an implementation of the relational database concept. Learn more in the data chapter or view the table of contents for all topics.

Useful SQLite tools and code

SQLite is used in such a wide variety of industries that there are open source tools and example code for all kinds of edge case uses. Here are several tools and bits of code I have found useful while coding my applications:

  • sqlitebiter (source code) is a command-line tool for converting various data formats such as comma-separated values (CSV), HTML, Markdown and JSON (among others) into a SQLite database file.

  • Scout (source code) is a Flask-powered search server for SQLite backends. The introductory post is really handy for getting started with Scout.

  • Datasette makes it easy to expose JSON APIs from your SQLite database without coding up a custom web application. Make sure to check out the Datasette getting started guide as well.

  • SQLite Browser is an open source graphical user interface for working with SQLite.

  • The Membership SQLite SQL scripts provide example code for storing user accounts, roles and authentication tokens in web applications.

SQLite tutorials

It's a good idea to brush up on the basics for using SQLite before you use the database in your project through SQL scripts or via an object-relational mapper. These tutorials will help you get started.

Specific SQLite scenarios

These are solid resources if you are looking to solve a particular problem you are having with SQLite rather than going through a general tutorial.

What do you want to learn next about data?

Tell me about standard relational databases.

What're these NoSQL data stores hipster developers keep talking about?

I want to know about working with data in Python.

Matt Makai 2012-2019