flux.kvs module

class flux.kvs.KVSDir(flux_handle=None, path='.', handle=None)

Bases: flux.wrapper.WrapperPimpl, collections.abc.MutableMapping

class InnerWrapper(flux_handle=None, path='.', handle=None)

Bases: flux.wrapper.Wrapper

class KVSDirIterator(kvsdir)

Bases: collections.abc.Iterator

next()
commit(flags=0) → int
directories()
exists(name)
files()
fill(contents: Mapping[str, Any])

Populate this directory with keys specified by contents

Parameters:contents -- A dict of keys and values to be created in the directory or None, sub-directories can be created by using dir.file syntax, sub-dicts will be stored as json values in a single key
key_at(key)
list_all()
mkdir(key: str, contents: Mapping[str, Any] = None)

Create a new sub-directory, optionally pre-populated with the contents of files as would be done with fill(contents)

Parameters:
  • key -- Key of the directory to be created
  • contents -- A dict of keys and values to be created in the directory or None, sub-directories can be created by using dir.file syntax, sub-dicts will be stored as json values in a single key
class flux.kvs.KVSWrapper(ffi, lib, handle=None, match=None, filter_match=True, prefixes=(), destructor=None)

Bases: flux.wrapper.Wrapper

flux_kvsitr_next(*args, **kwargs)
flux.kvs.commit(flux_handle, flags: int = 0) → int
flux.kvs.dropcache(flux_handle)
flux.kvs.exists(flux_handle, key)
flux.kvs.get(flux_handle, key)
flux.kvs.get_dir(flux_handle, key='.')
flux.kvs.get_key_direct(flux_handle, key)
flux.kvs.inner_walk(kvsdir, curr_dir, topdown=False)
flux.kvs.isdir(flux_handle, key)
flux.kvs.join(*args)
flux.kvs.put(flux_handle, key, value)
flux.kvs.put_mkdir(flux_handle, key)
flux.kvs.walk(directory, topdown=False, flux_handle=None)

Walk a directory in the style of os.walk()