Skip to content
/ kobold Public

Pythonic namespaced key-value local storage. Useful for kobolds with too many shiny stateful parameters, aliases, and configurables.

License

Notifications You must be signed in to change notification settings

rcox771/kobold

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KoBold3

A bold Pythonic namespaced key-value local storage.

Useful for kobolds with too many shiny stateful parameters, aliases, and configurables.


Install

pip install kobold3

Usage

Setting Arbitrary K-V Pairs

kb store - set -a=1 -b=2 -c=3

Getting Them

kb store - get a

What's the '-' for?

Good thing you asked. Underneath the hood, this package uses Python's shelve implementation to create and manage named shelves stored in the user's home directory found at $HOME/.kobold.

The '-' is a placeholder for default named shelve ('default').

Why are named kv stores useful?

Say you worked on multiple AWS accounts that you switched between often.

echo `kb store aws.env-1 get account_num`
# 1234...

echo `kb store aws.env-2 get account_num`
# 5678...

kb store aws set -envs=1,2,3,4

kb store aws get envs
#[ 1, 2, 3, 4]

About

Pythonic namespaced key-value local storage. Useful for kobolds with too many shiny stateful parameters, aliases, and configurables.

Resources

License

Stars

Watchers

Forks

Packages

No packages published