Application Programming Interfaces

Application Programming Interfaces

Application Programming Interfaces

The CFG format can be used through libraries with an API, which depends on the implementation language. The following sections describe the API exposed by a number of different implementations of functionality to work with CFG.

In all current implementations, there are two levels:

  • A low level which parses CFG source to produce an abstract syntax tree (AST).
  • A higher level which uses the parser to create higher-level configuration objects, which are what your programs will interact with in most cases.

Currently, only the higher level is documented, as it should be all that’s needed to work with CFG files.

Use the links below to look at the APIs for various languages. They are broadly similar for each of the implementations – Python, the JVM (using Kotlin), .NET, Go, Rust and D.