Skip to main content

A simple SQLite3 wrapper for Python

Project description

Simple SQLite3

Simple SQLite3 is a lightweight Python library that provides a simple and intuitive wrapper for working with SQLite3 databases. It includes features for managing tables, querying data, and performing common database operations.

Features

  • Easy-to-use API for SQLite3 database and table management.
  • Command-line interface (CLI) for database operations.
  • Support for exporting data to CSV and JSON formats.
  • Utilities for querying results.

Installation

Install the library using pip:

pip install simple-sqlite3

Usage

Programmatic Usage

from simple_sqlite3 import Database

# Create or connect to a database
db = Database("database.db")

# Create a table
table = db.table("tab")

# Insert data
table.insert([
    {"letter": "A", "order": 1},
    {"letter": "B", "order": 2},
])

# Query data
results = table.query("SELECT *")
print(results)

Command-Line Interface (CLI)

  • Query a table:
db query -database database.db -table tab -sql "SELECT *"
  • Delete a table:
db delete -database database.db -table tab
  • Export a table to CSV:
db export -database database.db -table tab -format csv -output output.csv

For a full list of commands, run:

db --help

License

This project is developed by Rob Suomi and licensed under the MIT License. See the LICENSE file for details.

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

simple_sqlite3-0.0.1.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

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

simple_sqlite3-0.0.1-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

Details for the file simple_sqlite3-0.0.1.tar.gz.

File metadata

  • Download URL: simple_sqlite3-0.0.1.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for simple_sqlite3-0.0.1.tar.gz
Algorithm Hash digest
SHA256 7e21b2c2972ecf418a720e799f59e3266b7261628355e94eae9b7296f45af4ef
MD5 02a8c8afd49f72af5b3fcd87773b89a8
BLAKE2b-256 f8fd532d59569ba0f10521d927711359872c3e44756006423ca782fd33b1eda9

See more details on using hashes here.

File details

Details for the file simple_sqlite3-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: simple_sqlite3-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 13.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for simple_sqlite3-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a91f6c7b6349ae714e01acdcbf90d328f13a685360aca71f711acb3da24d9d83
MD5 871b6c8e6ccc1164b2a90ce5cba827ed
BLAKE2b-256 e5ad3afa8b805d9bdfc0f70f975964333465238caeacfcdb02ff471fecbeb586

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