Skip to main content

No project description provided

Project description

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 d
  • d.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:

  • InMemoryBlobDict for in-memory storage, with optional TTL
  • PathBlobDict for specified folder on file system as storage, with relative file path as key
    • It supports local file systems via PathLib
    • It also supports cloud file systems (like AWS S3 (and competible Cloudflare R2), Azure Blob Storage, and Google Cloud Storage) via CloudPathLib
  • VulkeyBlobDict for Vulkey/Redis-based storage, with optional TTL
  • Specially, MultiReplicaBlobDict for 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:

  • BytesBlob for any data
    • StrBlob for any string
      • JsonDictBlob for any JSON dict object
      • JsonModelBlob for any Pydantic model object
    • AudioBlob for any SoundFile audio data
    • ImageBlob for any PIL/Pillow image data
    • VideoBlob for any MoviePy video clip data

Ultimately, all data are persisted as bytes.

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

blob_dict-0.1.2.tar.gz (99.7 kB view details)

Uploaded Source

Built Distribution

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

blob_dict-0.1.2-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file blob_dict-0.1.2.tar.gz.

File metadata

  • Download URL: blob_dict-0.1.2.tar.gz
  • Upload date:
  • Size: 99.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.10

File hashes

Hashes for blob_dict-0.1.2.tar.gz
Algorithm Hash digest
SHA256 7613b7d3112b04ba249fee66df546f99a26a5cb42867f19294679e1c87b53401
MD5 3944247e39257a522b34bf58eafcdc00
BLAKE2b-256 e01bf440eba7ea99e1db3f41961c0067a1290c278e631051b50b4d75eb155b1a

See more details on using hashes here.

File details

Details for the file blob_dict-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: blob_dict-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.10

File hashes

Hashes for blob_dict-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3b9fe88187dab10cfe769b6bf0f33af44e4a2be069e200ad22397a68bfd5d767
MD5 1db7cb6337b6df2cf80dc95673de4afd
BLAKE2b-256 ea8b0af792188e89cb4eb8f37b7f723f1ef59b48ee2b6adb7c01d536bf9d6f22

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