Skip to main content

KV API implementation on Azure Blob Storage

Project description

Key-Value: Azure Blob

Implementation of the KV[T] async Key-Value ABC, over Azure Blob Storage

(kv-api)

pip install kv-azure-blob

Usage

Raw

from azure.storage.blob.aio import ContainerClient
from kv.azure.blob import BlobKV

cc: ContainerClient = ...
kv = BlobKV[bytes](cc)
await kv.insert('img1', b'...')
await kv.read('img2')
await kv.keys()
# etc.

Pydantic-validated

from dataclasses import dataclass

@dataclass
class User:
  username: str
  email: str

cc: ContainerClient = ...
kv = BlobKV.validated(User, cc)
await kv.insert('user1', User(username='user1', email='...'))
# etc.

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

kv_azure_blob-0.1.1.tar.gz (2.7 kB view hashes)

Uploaded Source

Built Distribution

kv_azure_blob-0.1.1-py3-none-any.whl (2.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page