Skip to content

aignise/SQlite-Library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

# Python SQLite Library

## Introduction
This library provides a simplified interface for interacting with SQLite databases using Python. It abstracts away the complexity of direct SQL commands while allowing for easy and quick database operations.

## Features
- Easy-to-use functions for managing SQLite connections.
- Functions for executing insert, update, delete, and select queries.
- Utility functions for common database operations.
- Migration system for managing database schema changes.
- Examples and unit tests included.

## Requirements
- Python 3.6 or higher

## Installation
Clone this repository or download the library files directly into your project directory.

```bash
git clone https://github.com/yourusername/python-sqlite-library.git

Usage

Here's how you can use the various functions in the library:

Creating a Database Connection

from sqlite_library import get_connection
connection = get_connection('my_database.db')

Creating Tables

from sqlite_library.migration import apply_migration, create_users_table
apply_migration(connection, create_users_table)

Inserting Data

from sqlite_library.query import insert_data
user_data = {'username': 'johndoe', 'password': 'securepassword', 'email': 'johndoe@example.com'}
insert_data(connection, 'users', user_data)

Updating Data

from sqlite_library.query import update_data
updates = {'password': 'newpassword'}
conditions = {'username': 'johndoe'}
update_data(connection, 'users', updates, conditions)

Deleting Data

from sqlite_library.query import delete_data
delete_data(connection, 'users', conditions)

Fetching Data

from sqlite_library.query import fetch_data
rows = fetch_data(connection, 'users')
for row in rows:
    print(row)

Contributing

Contributions are welcome! Please fork the repository and open a pull request with your improvements.

License

This library is released under the MIT License. See the LICENSE file for more details.

Contact

If you have any questions or feedback, please contact me at [your-email@example.com].


Replace `https://github.com/yourusername/python-sqlite-library.git` with your actual repository URL, and `ashreyignise@gmail.com` with your contact email. You should also provide a `LICENSE` file if it's not already present.

Would you like this README.md file to be created in your project directory?

About

A modular Python library for simplified interaction with SQLite databases, featuring easy-to-use functions for database operations, schema migrations, and utility tasks.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages