Skip to main content

A light SQLite3 wrapper for easier database operations in Python.

Project description

SleekQL

SleekQL is a light SQLite3 wrapper for Python, designed to execute simple operations more quickly.

Python License

🔧 Features

  • Create a database
  • Delete from database
  • Drop database
  • Fetch data from database
  • insert and update
  • Execute raw SQL

🚀 Usage

Import and setup

from SleekQL import SleekQL

# Initialize with database name or path
db = SleekQL("database.db")

Functions

# Close connection to database
db.close_connection()

# Create table
db.create_table(
  table_name="Table1",
  columns=["Column1", "Column2"],
  datatypes_constraints=["INTEGER PRIMARY KEY", "TEXT"]
)

# Insert data
db.insert(table_name="Table1", columns=["Column1", "Column2"], values=[100, "Data"])

# Fetch data and return list[dict]
db.select(table_name="Table1", columns=["*"])

# Update data
db.update(table_name="Table1", columns_values=["Column1 = 101", "Column2 = 'DATA'"])

# Delete data
db.delete(table_name="Table1", where="Column1 = 101")

# Drop table
db.drop_table(table_name="Table1")

Use raw SQL

# returns List[tuple] if needed
db.raw_sql(query="SELECT * FROM Table1")

📦 Installation

pip install sleekql

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sleekql-1.0.0.tar.gz (15.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sleekql-1.0.0-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

Details for the file sleekql-1.0.0.tar.gz.

File metadata

  • Download URL: sleekql-1.0.0.tar.gz
  • Upload date:
  • Size: 15.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for sleekql-1.0.0.tar.gz
Algorithm Hash digest
SHA256 92ae5e3fe8c352ec193d8909989cb168020632ff1ddf195951489c201e6ab5da
MD5 d2be750ac75a21dcddf00cb65f38988e
BLAKE2b-256 06b88e3ecf127f86c579fc450b861cf0a73bd93de68641c9e7a2b8776fab1059

See more details on using hashes here.

File details

Details for the file sleekql-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: sleekql-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 15.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for sleekql-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cb11d47a6e8825dd143074331561d8cc47a236f471318c65484353f835408832
MD5 25ed77fe4fad6b882a115c5806114300
BLAKE2b-256 62e6ecb68563a631a2d83a2eb812862a6c8aef58201312f96b7a8e68249345f6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page