Skip to content

pbarker/kvd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kvd

A KV store built on ModelOS

Installation

pip install kvd

kvd requires a working Kubernetes cluster, found by the current kubeconfig context. Currently, it has only been tested on KinD

Usage

Run locally

from kvd import KVStore

EXAMPLE_DATA = "https://raw.githubusercontent.com/savingoyal/systems-assignment/main/example.data"

kvs = KVStore(EXAMPLE_DATA)

val = kvs.get("bf32dd39-9bb2-4537-ba32-9a57c90ace8")

Generate a remote instance on Kubernetes

from kvd import KVStore

KVSClient = KVStore.client()

with KVSClient(EXAMPLE_DATA) as kvs:
    val = kvs.get("bf32dd39-9bb2-4537-ba32-9a57c90ace8")

| NOTE: Remote usage requires push access to the image registry defined in tool.modelos.image_repo in pyproject.toml

Generate remote instance on Kubernetes using only the client

from kvd import KVStoreClient

with KVStoreClient(EXAMPLE_DATA) as kvs:
    val = kvs.get("bf32dd39-9bb2-4537-ba32-9a57c90ace8")

See tests for working examples

About

A KV store built on ModelOS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published