dictature -- A generic wrapper around dict-like interface with mulitple backends
Project description
SQLiDictature
A wrapper for Python's dictionary with multiple backends.
Installation
pip install dictature
Dictature usage
This package also includes a class that allows you to use your SQLite db as a Python dictionary:
from dictature import Dictature
from dictature.backend import DictatureBackendDirectory, DictatureBackendSQLite
# will use/create the db directory
# dictionary = Dictature(DictatureBackendDirectory('test_data'))
# will use/create the db file
dictionary = Dictature(DictatureBackendSQLite('test_data.sqlite3'))
# 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dictature-0.9.0.tar.gz.
File metadata
- Download URL: dictature-0.9.0.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c36f4e7f4ae776b48b6ec453ddbc4c82937d2852e3dede8aca7524b0e7c2a77
|
|
| MD5 |
c275cc1b836ed68fc80c071d1374c734
|
|
| BLAKE2b-256 |
5744245c6aa3aa28f01aeed478bc3efb3d1f7b1fece74eda5c817885951795e8
|
Provenance
The following attestation bundles were made for dictature-0.9.0.tar.gz:
Publisher:
pypi-deploy.yml on esoadamo/dictature
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dictature-0.9.0.tar.gz -
Subject digest:
6c36f4e7f4ae776b48b6ec453ddbc4c82937d2852e3dede8aca7524b0e7c2a77 - Sigstore transparency entry: 174254653
- Sigstore integration time:
-
Permalink:
esoadamo/dictature@5ba683522b6e3e98cd7c0c1c797d0f9143730038 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/esoadamo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-deploy.yml@5ba683522b6e3e98cd7c0c1c797d0f9143730038 -
Trigger Event:
push
-
Statement type:
File details
Details for the file dictature-0.9.0-py3-none-any.whl.
File metadata
- Download URL: dictature-0.9.0-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b881466042952e32381e69241312fcf331cb452d667be361b0f0892e09dd6550
|
|
| MD5 |
0f76e9084a36904ac994bf9a86965a43
|
|
| BLAKE2b-256 |
ef910ef492c1a11e775e94a92c09d6138c28791e7fcff85955dbbe2ec4b4c2cc
|
Provenance
The following attestation bundles were made for dictature-0.9.0-py3-none-any.whl:
Publisher:
pypi-deploy.yml on esoadamo/dictature
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dictature-0.9.0-py3-none-any.whl -
Subject digest:
b881466042952e32381e69241312fcf331cb452d667be361b0f0892e09dd6550 - Sigstore transparency entry: 174254654
- Sigstore integration time:
-
Permalink:
esoadamo/dictature@5ba683522b6e3e98cd7c0c1c797d0f9143730038 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/esoadamo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-deploy.yml@5ba683522b6e3e98cd7c0c1c797d0f9143730038 -
Trigger Event:
push
-
Statement type: