Skip to content

Raaj-Vaishnav-Tripathi/SQLite-Python

Repository files navigation

## SQLite File Explorer

This Python project provides a simple tool to explore the basic structure and information of SQLite database files. It's a great way to get started with interacting with databases using Python!

What is SQLite?

SQLite is a lightweight, self-contained database engine commonly used for storing data in mobile apps and other situations where a simple and compact solution is needed.

What can this project do?

  • Verify file validity: Ensures you're working with a valid SQLite database (version 3 format).
  • Retrieve basic database information: Provides details like database page size, giving insight into data storage within the file.

Who is this project for?

  • Python Beginners: This project helps you practice working with files and basic database concepts using Python.
  • SQLite Developers: This tool is useful for quickly checking the structure and validity of SQLite files.

Getting Started

  1. Prerequisites: Ensure you have Python 3.8 and pipenv installed. pipenv is a virtual environment management tool for Python.

  2. Download Project Files: Clone this repository or download the project files directly.

  3. Install Dependencies: Open a terminal or command prompt and navigate to the project directory. Then, run:

    pip install pipenv
    

    This installs the necessary Python libraries for the project to function.

Using the Project

Once the dependencies are installed, use the project by running the following command in your terminal:

python3 -m app.sqlite_explorer "my_database.db" ".dbinfo" --config "settings.yaml"

Here's a breakdown of the command arguments:

  • <sqlite_file>: Path to the target SQLite database file.
  • <command>: Currently supports only .dbinfo, which provides basic database information.
  • [ --config <config_file> ] (Optional): Path to the configuration file (project_config.yml) for potential customization (not covered in this basic usage).

Example:

Assuming you have an SQLite database file named sample.db in your project directory, run the following command to get basic information about the database:

python3 -m app.sqlite_explorer "sample.db" ".dbinfo"

This will output information like the database page size.

Contributing

This project serves as a starting point. Feel free to explore functionalities like:

  • Support for additional dot commands (more advanced)
  • Retrieving basic table information (more advanced)

License

This project uses a permissive, copyright-free approach. Feel free to use and modify the code according to your needs.

Additional Notes

  • This project provides a foundation for exploring SQLite databases with Python.
  • Consider learning more about SQLite and Python database programming for further functionalities.

By using this project, you acknowledge that it is provided as-is without warranty.

About

A Python tool for exploring SQLite database files, enabling users to verify file validity and retrieve essential database information with a simple command-line interface.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors