Skip to main content

sqlidictature -- A wrapper for Python's inbuilt SQLite with multithreading support and dict-like interface.

Project description

SQLiDictature

A wrapper for Python's inbuilt SQLite with multithreading support.

Installation

pip install sqlidictature

Database usage

from sqlidictature import SQLiteDB
db = SQLiteDB('my.sqlitedb')
for record in db.execute("SELECT * FROM table"):
    print(record)

IndexedDB usage

This package also includes a class that allows you to use your SQLite db as a Python dictionary:

from sqlidictature import SQLiDictature

# will use/create the db file
dictionary = IndexedDBManager('my.sqlitedb')

# will create a table db_test and there a row called foo with value bar
dictionary['test']['foo'] = 'bar'

# also support anything that can be jsonized
dictionary['test']['list'] = ['1', 2, True]
print(dictionary['test']['list'])  # prints ['1', 2, True]

# or anything, really (that can be serialized with pickle)
from threading import Thread
dictionary['test']['thread'] = Thread
print(dictionary['test']['thread'])  # prints <class 'threading.Thread'>

# and deleting
del dictionary['test']['list']  # deletes the record
del dictionary['test']  # drops whole table

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

sqlidictature-0.9.9.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

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

sqlidictature-0.9.9-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file sqlidictature-0.9.9.tar.gz.

File metadata

  • Download URL: sqlidictature-0.9.9.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for sqlidictature-0.9.9.tar.gz
Algorithm Hash digest
SHA256 231251404b256ddc568f4c635066f7f274c4287312a5bad8f2b751bf039be240
MD5 c8935fa83d586bec0168baacd2616cb7
BLAKE2b-256 4cc349432d708aa6d98134c38581ba73ec0db44e45c46db442c01c34ebf7b288

See more details on using hashes here.

Provenance

The following attestation bundles were made for sqlidictature-0.9.9.tar.gz:

Publisher: pypi-deploy.yml on esoadamo/sqlidictature

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sqlidictature-0.9.9-py3-none-any.whl.

File metadata

  • Download URL: sqlidictature-0.9.9-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for sqlidictature-0.9.9-py3-none-any.whl
Algorithm Hash digest
SHA256 5a83edcad10bb3803bc948555205d76395e7be5a3c724714c399f179cca45b90
MD5 d9ae6da82c8abef8c55c47c8077af10e
BLAKE2b-256 b13b37b859789c3238da50a049a6ec33646066cd6a26e1e3c3db64f08ddfedf3

See more details on using hashes here.

Provenance

The following attestation bundles were made for sqlidictature-0.9.9-py3-none-any.whl:

Publisher: pypi-deploy.yml on esoadamo/sqlidictature

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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