Skip to main content

René's minimal wrapper around Python's sqlite3 module

Project description

RenesSQLiteHelper

René's minimal wrapper around Python's built-in sqlite3 module.

Installation

pip install RenesSQLiteHelper

Usage

Create a database

Note the first parameter (__file__) to create the database in a filesystem path relative to the script using it.

from RenesSQLiteHelper import open_db, bulk_load
con = open_db(__file__, 'some-data.db', deleteIfExists = True)

con.execute('''
create table tab (
   id  integer primary key,
   val text
)
''')

Use the databae

con = open_db(__file__, 'some-data.db')

with bulk_load(con) as cur:
    cur.execute('insert into tab values (?, ?)', (42, 'hello world'))

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

renessqlitehelper-0.1.0.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

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

renessqlitehelper-0.1.0-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file renessqlitehelper-0.1.0.tar.gz.

File metadata

  • Download URL: renessqlitehelper-0.1.0.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for renessqlitehelper-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7e7bd387aff86e53b48096c9c83fad8c835ae86a7117e8a3366e557d06f312cf
MD5 7d9d7f49beb860291c80717146e199ed
BLAKE2b-256 59dd5f537d6d9923823863f8abd3a23834c99e26a4c4e9bfee944e30aa3bf0ed

See more details on using hashes here.

File details

Details for the file renessqlitehelper-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for renessqlitehelper-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d13e8564e7a132db6f50d4eab282ae928909cda595b95ce632fa9e72c8c41891
MD5 68874d3ea8a973c5070dd95610d465a5
BLAKE2b-256 46c72b0ec93e5684b50a0736c00eaac890b6aeb4881a512b165933fdfd8e4cab

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