Getting Started With SQLite Database in Python

In this article I’ll walk you through the process of using SQLite database, which is an in-built database for Python. We will start by creating an empty database, we will create an empty table, we will insert some data into it and then finally we will try to retrieve our data back.

Let’s start by importing some required packages.

Import Required Packages

import sqlite3 as sql

Create Database

--

--

--

I’m C# Corner MVP, mentor, speaker, YouTuber & developer. YouTube: https://www.youtube.com/channel/UCQVOeT4i5nezvPG_xvIFzdQ Blog: http://www.shwetalodha.in

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Read YAMLy config with a few lines of code

Choreo observability for improved developer productivity

ABOUT PYTHON - STRING MANIPULATION

Rubic Weekly Report 02/19

Git Under the Hood, Part 2: Referencing Commits

Create PDF reports using R, R Markdown, LaTeX and knitr (on macOS High Sierra)

How to quickly prototype apps with CSS Grid and CSS Variables

Hyperledger Fabric “Building Your First Network” Tutorial — Part 2

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Shweta Lodha

Shweta Lodha

I’m C# Corner MVP, mentor, speaker, YouTuber & developer. YouTube: https://www.youtube.com/channel/UCQVOeT4i5nezvPG_xvIFzdQ Blog: http://www.shwetalodha.in

More from Medium

Install Python Package On Per User Basis

Socket Programming in Python (setup the client and server)

Python for Databases

Elegant Way to Manage Multiple Independent Python, MySQL, Node Versions