Elektra
0.8.21
|
Elektra serves as a universal and secure framework to access configuration settings in a global, hierarchical key database.
Elektra provides a mature, consistent and easily comprehensible API. Its modularity effectively avoids code duplication across applications and tools concerning their configuration tasks. Elektra abstracts from cross-platform-related issues and enables applications to be aware of other applications' configurations, leveraging easy application integration.
Elektra consists of three parts:
To highlight a few concrete things about Elektra, configuration settings can come from any data source, but usually comes from configuration files that are _mounted_ into Elektra similar to mounting a file system. Elektra is a plugin-based framework, for example, plugins implement various configuration formats like INI, JSON, XML, etc. There is a lot more to discover like executing scripts (python
, lua
or shell
) when a configuration value changes, or, enhanced validation plugins that will not allow corrupted configuration settings to reach your application.
As an application developer you get instant access to various configuration formats and the ability to fallback to default configuration settings without having to deal with this on your own. As an system administrator you can choose your favorite configuration format and mount this configuration for the application. Mounting enables easy application integration as any application using Elektra can access any mounted configuration. You can even mount /etc
files such as hosts
or fstab
, so that there is no need to configure the same values twice in different files.
In case you are worried about linking to such a powerful library. The core is a small library implemented in C, works cross-platform, and does not need any external dependencies. There are bindings for other languages in case C is too low-level for you.
Do not hesitate to ask any question on GitHub issue tracker or directly to one of the authors.
If you want to use Elektra for your application, read the application integration tutorial.
The preferred way to install Elektra is by using packages provided for your distribution, see INSTALL for available packages and alternative ways for installation.
Note: It is preferable to use a recent version: They contain many bug fixes and usability improvements.
Now that we have Elektra installed, we can start using the kdb command:
For import/export/mount formats see Plugins. For information about elektrified environment variables, see /src/libgetenv/README.md.
For people preferring graphical user interfaces, we provide qt-gui.
To get an idea of Elektra, you can take a look at the presentation.
In the GitHub repository the full documentation is available, including:
You can read the documentation for the kdb tool, either
man kdb
kdb --help
or kdb help <command>
Note: All these ways to read the documentation provide the same content, all generated from the GitHub repository.
And in terms of quality, we want:
Read more about the goals of Elektra
Go to the website, see News, and its RSS feed.
Elektra uses a git repository at GitHub.
You can clone the latest version of Elektra by running:
git clone https://github.com/ElektraInitiative/libelektra.git
Releases can be downloaded from http and ftp://ftp.libelektra.org/elektra/releases/
The build server builds Elektra for every pull request and on every commit in various ways and also produces LCOV code coverage report.
Take a look at how to start.