Common interface for many key-value storages
Project description
Omnidict
Opinionated interface for many key/value repositories:
I am kind of tired of having to do small changes when I move from Dictionary, to Redis, to Shelve or whatever key/value storage I am using. This is an interface heavily inspired by builtin shelve module to make all those mapping repositories behave the same way:
Get item: storage['key'] returns the value associated to 'key' and raises a KeyError if 'key' is not defined. storage.get('key') behaves the same way but returns default() when 'key' is not defined.
Set item: storage['key'] = val associates val to 'key' and raises a KeyError if 'key' already has a value associated. storage.set('key', val) behaves the same way but overwrites association if it already exists.
Delete item: del storage['key'] deletes 'key' and raises a KeyError if 'key' is not defined. storage.delete('key') behaves the same way but does nothing when 'key' is not defined.
Expiration: You can define expire_seconds parameter to make your associations expire. Expiration time is refreshed every time you access a key.
Encryption: You can define a passphrase parameter to encrypt your values using symmetric encryption.
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 omnidict-1.0.0a8.tar.gz.
File metadata
- Download URL: omnidict-1.0.0a8.tar.gz
- Upload date:
- Size: 47.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ddb5f0670c953007bf9d2ae595e0fad08b7f0f4e94dd726570fa6f2087c9d807
|
|
| MD5 |
5e4b2fd12723f8097a30153f91aa824b
|
|
| BLAKE2b-256 |
d14e4c5f8cd55e96c54b51f7d9fc96995424cc090d885dd33cd3ade7d5ad2a54
|
Provenance
The following attestation bundles were made for omnidict-1.0.0a8.tar.gz:
Publisher:
publish-to-pypi.yaml on santibreo/omnidict
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
omnidict-1.0.0a8.tar.gz -
Subject digest:
ddb5f0670c953007bf9d2ae595e0fad08b7f0f4e94dd726570fa6f2087c9d807 - Sigstore transparency entry: 216330506
- Sigstore integration time:
-
Permalink:
santibreo/omnidict@ec8abd13f9186ef0b8a2513d2893290a93cfe421 -
Branch / Tag:
refs/tags/v1.0.0a8 - Owner: https://github.com/santibreo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yaml@ec8abd13f9186ef0b8a2513d2893290a93cfe421 -
Trigger Event:
push
-
Statement type:
File details
Details for the file omnidict-1.0.0a8-py3-none-any.whl.
File metadata
- Download URL: omnidict-1.0.0a8-py3-none-any.whl
- Upload date:
- Size: 32.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 |
b087f16ea751bfdf601b4a4327210a8032b7764da4af4a1fcaadcfb0fd9111bf
|
|
| MD5 |
66244c4f98a12fe621f5f9098024ae08
|
|
| BLAKE2b-256 |
54df85ba1e78cf0b033d5b1eff568fcf6e4fd3a438ab44d06692f54732f9d91c
|
Provenance
The following attestation bundles were made for omnidict-1.0.0a8-py3-none-any.whl:
Publisher:
publish-to-pypi.yaml on santibreo/omnidict
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
omnidict-1.0.0a8-py3-none-any.whl -
Subject digest:
b087f16ea751bfdf601b4a4327210a8032b7764da4af4a1fcaadcfb0fd9111bf - Sigstore transparency entry: 216330507
- Sigstore integration time:
-
Permalink:
santibreo/omnidict@ec8abd13f9186ef0b8a2513d2893290a93cfe421 -
Branch / Tag:
refs/tags/v1.0.0a8 - Owner: https://github.com/santibreo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yaml@ec8abd13f9186ef0b8a2513d2893290a93cfe421 -
Trigger Event:
push
-
Statement type: