Introduction
This library allows you to access blobs via Pythonic dict-like interface.
Note that due to the nature of blob, not all dict methods are implemented.
Therefore, it is not a subclass of MutableMapping type.
Supported Blob Dict Methods
Specifically, for a blob dict d, the following methods are available:
len(d)key in dd.get(key, default)d[key]for key in d:d.pop(key, default)del d[key]d[key] = blob
Supported Blob Dict Types
There are different blob dict implementations:
InMemoryBlobDictfor in-memory storage, with optional TTLPathBlobDictfor specified folder on file system as storage, with relative file path as key- It supports local file systems via
PathLib- Ideally use provided
LocalPathclass (which is a subclass ofPath) for full support
- Ideally use provided
- It also supports cloud file systems (like AWS S3 (and competible Cloudflare R2), Azure Blob Storage, and Google Cloud Storage) via
CloudPathLib
- It supports local file systems via
GitBlobDictfor specified Git repo on file system as storage, with relative file path as key- It auto commits any add/update/delete
- It auto syncs with remote if enabled
- Optionally, key can be tuple where the second part is version:
strfor version at specified commit/tag, likeHEAD~2intfor relative version (same way of Python sequence index) of file, like0for first version and-2for previous versiondatetimefor latest version before specified date/timetimedeltafor latest version of specified duration before now
VulkeyBlobDictfor Vulkey/Redis-based storage, with optional TTL- Specially,
MultiReplicaBlobDictfor utilizing multiple blob dicts underneath- For example, you can use in-memory or local file system blob dict as cache layer, while any cloud file system blob dict as storage
Supported Blob Types
There as many types of blobs with following class hierarchy relationship:
BytesBlobfor any dataStrBlobfor any stringJsonDictBlobfor any JSONdictobjectJsonModelBlobfor any Pydantic model object
AudioBlobfor any SoundFile audio dataImageBlobfor any PIL/Pillow image dataVideoBlobfor any MoviePy video clip data
Ultimately, all data are persisted as bytes.
Metadata
Release files for blob-dict 0.1.16
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| blob_dict-0.1.16.tar.gz | 123.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| blob_dict-0.1.16-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 138.3 kB
Release files / blob_dict-0.1.16.tar.gz
| Download URL | blob_dict-0.1.16.tar.gz |
|---|---|
| Size | 123.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c314fa6b103b17a7e9c33c63f1b5340f49df189f44e63ca015359d944ac3e051
|
|
BLAKE2b-256 checksum How to use checksums |
73752f273067df4211b1c956501f7f8d94f0cc8e312e0525428efa01235d9d86
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.14
|
Release files / blob_dict-0.1.16-py3-none-any.whl
| Download URL | blob_dict-0.1.16-py3-none-any.whl |
|---|---|
| Size | 14.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
556449da6d61169ea1ebe815cd80d963b581a5c888f21b42318f753eafe9907a
|
|
BLAKE2b-256 checksum How to use checksums |
0edc33c0d4b74aa144927276c044ae8e98bd3383635175eb6c4039fa86b0ce59
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.14
|