Lightweight immutable key-value store using S3 versioning
Project description
ImmuKV - Python Client
Lightweight immutable key-value store using S3 versioning.
Installation
pip install immukv
Quick Start
from immukv import ImmuKVClient, Config
config = Config(
s3_bucket="your-bucket",
s3_region="us-east-1",
s3_prefix=""
)
# Identity functions for JSON values (use custom encoders/decoders for complex types)
def identity(x): return x
with ImmuKVClient(config, identity, identity) as client:
# Write
entry = client.set("key1", {"value": "data"})
print(f"Committed: {entry.version_id}")
# Read
latest = client.get("key1")
print(f"Latest: {latest.value}")
# List keys
keys = client.list_keys(None, 100)
# List keys with prefix filtering (server-side)
sensor_keys = client.list_keys_with_prefix("sensor-", None, 100)
Features
- Immutable log - All writes append to global log
- Fast reads - Single S3 request for latest value
- Hash chain - Cryptographic integrity verification
- No database - Uses S3 versioning only
- Auto-repair - Orphaned entries repaired automatically
- Credential providers - Pluggable async credential refresh via
CredentialProvider - Sync API - Synchronous interface backed by aiobotocore with a background event loop
Credential Providers
The client supports static credentials or an async credential provider for dynamic credential refresh (e.g., OIDC federation). The credential provider is backed by AioDeferredRefreshableCredentials for automatic refresh.
from immukv import ImmuKVClient, Config, S3Overrides, S3Credentials
# Static credentials
config = Config(
s3_bucket="bucket",
s3_region="us-east-1",
s3_prefix="",
overrides=S3Overrides(
credentials=S3Credentials(
aws_access_key_id="AKIA...",
aws_secret_access_key="...",
aws_session_token="...",
),
),
)
# Async credential provider
async def my_provider() -> S3Credentials:
return S3Credentials(
aws_access_key_id="AKIA...",
aws_secret_access_key="...",
aws_session_token="...", # Optional
expires_at=some_datetime, # Optional (defaults to 1 hour from now)
)
config_with_provider = Config(
s3_bucket="bucket",
s3_region="us-east-1",
s3_prefix="",
overrides=S3Overrides(credentials=my_provider),
)
See the full documentation for more details.
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 immukv-0.1.26.tar.gz.
File metadata
- Download URL: immukv-0.1.26.tar.gz
- Upload date:
- Size: 41.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1854b46c15477d72f2cab5846259fb4dec7cf195014841c51c6f5e7350c967c2
|
|
| MD5 |
e9ae5d0ca752ff69b87862850b851e32
|
|
| BLAKE2b-256 |
5f5436c620b2d9e647a2f0ab1e9da1dc5a838c417e6662fbaa710809d6781186
|
Provenance
The following attestation bundles were made for immukv-0.1.26.tar.gz:
Publisher:
build.yml on Portfoligno/immukv
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
immukv-0.1.26.tar.gz -
Subject digest:
1854b46c15477d72f2cab5846259fb4dec7cf195014841c51c6f5e7350c967c2 - Sigstore transparency entry: 977305151
- Sigstore integration time:
-
Permalink:
Portfoligno/immukv@3b6608820f984f73187c9c5da90e93d12e2eb0e7 -
Branch / Tag:
refs/tags/0.1.26 - Owner: https://github.com/Portfoligno
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@3b6608820f984f73187c9c5da90e93d12e2eb0e7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file immukv-0.1.26-py3-none-any.whl.
File metadata
- Download URL: immukv-0.1.26-py3-none-any.whl
- Upload date:
- Size: 23.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
640b6ee4a124e4c7b7e3d1f3e858441ecd32442ce4e6190e2baff4bfe04163a2
|
|
| MD5 |
2a32ad8d9b914f3e271adee8557f096d
|
|
| BLAKE2b-256 |
6076f1c3b14c7e01c580abb0126f24032467e33d887f22b4df5e6f3fee5c757d
|
Provenance
The following attestation bundles were made for immukv-0.1.26-py3-none-any.whl:
Publisher:
build.yml on Portfoligno/immukv
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
immukv-0.1.26-py3-none-any.whl -
Subject digest:
640b6ee4a124e4c7b7e3d1f3e858441ecd32442ce4e6190e2baff4bfe04163a2 - Sigstore transparency entry: 977305187
- Sigstore integration time:
-
Permalink:
Portfoligno/immukv@3b6608820f984f73187c9c5da90e93d12e2eb0e7 -
Branch / Tag:
refs/tags/0.1.26 - Owner: https://github.com/Portfoligno
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@3b6608820f984f73187c9c5da90e93d12e2eb0e7 -
Trigger Event:
push
-
Statement type: