A KV store built on ModelOS
pip install kvdkvd requires a working Kubernetes cluster, found by the current kubeconfig context. Currently, it has only been tested on KinD
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_repoin 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