SQLite

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.

接下来你想了解关于数据的哪些内容?

告诉我有关标准关系数据库的信息。

这些 NoSQL 数据存储是什么时髦开发人员一直在谈论?

我想知道在 Python 中使用数据。

Sign up for a monthly email with Full Stack Python tutorials. No spam ever.