Skip to content

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

fromkvdimportKVStoreEXAMPLE_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

fromkvdimportKVStoreKVSClient=KVStore.client()
withKVSClient(EXAMPLE_DATA) askvs:
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

fromkvdimportKVStoreClientwithKVStoreClient(EXAMPLE_DATA) askvs:
val=kvs.get("bf32dd39-9bb2-4537-ba32-9a57c90ace8")

See tests for working examples

About

A KV store built on ModelOS

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages