FastAPI - Beginner to Pro / Setting Up the Database

Installation of SQLite3 Terminal (Windows)

🧰 Installing SQLite3 on Windows

In this section, we’ll walk through how to install SQLite3 on a Windows operating system so you can interact with a SQLite database directly from the terminal.

This setup allows you to manipulate database data and run SQL commands outside of your application.


🌐 Downloading SQLite3

Open your web browser and navigate to the official SQLite website:

<https://sqlite.org/>

From the homepage, click on Download.

Scroll down the page until you find the section titled Precompiled Binaries for Windows.


📦 Downloading the SQLite Command-Line Tools

Under the Windows section, download the SQLite Tools Winx64 zip file.

This package includes the SQLite3 command-line tools required for 64-bit Windows systems.


📂 Extracting and Placing SQLite3

After the zip file finishes downloading:

  1. Extract the contents of the zip file

  2. Copy the extracted folder

  3. Paste it directly into your C:\ drive

  4. Rename the folder to SQLite3

You should now have the following directory structure:

**C:\\SQLite3**

🔗 Adding SQLite3 to the System PATH

To run SQLite3 from anywhere in the terminal, we need to add it to the system PATH.

Follow these steps:

  1. Open System Properties

  2. Click Environment Variables

  3. Under System variables, select Path

  4. Click Edit

  5. Click New

  6. Paste the full path to the SQLite3 folder (for example: C:\\SQLite3)

  7. Click OK, then OK, then OK again to save your changes

This step ensures that Windows knows where to find the SQLite3 executable.


🖥️ Verifying the Installation

Open Command Prompt and type:

sqlite3

If the installation was successful, SQLite will display its version information and open the SQLite shell.

This confirms that SQLite3 is properly installed and ready to be used from the terminal.