Elektra  0.9.4
High-level API

Projects usually do not want to use low-level APIs. KDB and KeySet is useful for plugins and to implement APIs but not to be directly used in applications.

  1. should be extremely easy to get started with
  2. should be very hard to use it wrong
  3. all high-level APIs should work together very nicely
    • same principles
    • same API style
    • same error handling
    • can be arbitrarily intermixed

We provide 3 high-level C APIs:

  1. libelektra-highlevel (generic key-value getter/setter)
  2. libelektra-hierarchy (generic hierarchical getter/setter in a tree)
  3. code generator (specified key-value getter/setter with function names, KeySets, or strings from specifications)

Furthermore, we will:

  1. Very easy to get started with, to get a key needs 3 lines of codes (without error handling):
Elektra *handle = elektraOpen ("/sw/elektra/kdb/#0/current", 0);
printf ("number /mykey is " ELEKTRA_LONG_F "\n", elektraGetLong (handle, "/mykey"));
elektraClose (handle);
  1. It is also easier to get started with writing new bindings.
  2. User can combine the different APIs.

https://issues.libelektra.org/1359