All Projects → A248 → DazzleConf

A248 / DazzleConf

Licence: LGPL-3.0 license
Incredible configuration library

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to DazzleConf

climatecontrol
Python library for loading settings and config data from files and environment variables
Stars: ✭ 20 (-41.18%)
Mutual labels:  config, configuration-management, configuration-files
parse it
A python library for parsing multiple types of config files, envvars & command line arguments that takes the headache out of setting app configurations.
Stars: ✭ 86 (+152.94%)
Mutual labels:  config, configuration-management, configuration-files
rubric
Linter Config Initializer for Python
Stars: ✭ 21 (-38.24%)
Mutual labels:  config, configuration-management, configuration-files
Config Rs
⚙️ Layered configuration system for Rust applications (with strong support for 12-factor applications).
Stars: ✭ 915 (+2591.18%)
Mutual labels:  config, configuration-management
Ini Parser
Read/Write an INI file the easy way!
Stars: ✭ 643 (+1791.18%)
Mutual labels:  config, configuration-management
Conf
Simple config handling for your app or module
Stars: ✭ 707 (+1979.41%)
Mutual labels:  config, configuration-management
Juno
Juno 译名朱诺。这个名字来源于古罗马神话中的众神之母。它是斗鱼的微服务管理系统, 如同众神之母一样守护着所有微服务的系统。
Stars: ✭ 285 (+738.24%)
Mutual labels:  config, configuration-management
Electrode Confippet
node.js environment aware application configuration
Stars: ✭ 109 (+220.59%)
Mutual labels:  config, configuration-management
Configuration
Library for setting values to structs' fields from env, flags, files or default tag
Stars: ✭ 37 (+8.82%)
Mutual labels:  config, configuration-management
Dynaconf
Configuration Management for Python ⚙
Stars: ✭ 2,082 (+6023.53%)
Mutual labels:  config, configuration-management
Node Convict
Featureful configuration management library for Node.js
Stars: ✭ 1,855 (+5355.88%)
Mutual labels:  config, configuration-management
Koanf
Light weight, extensible configuration management library for Go. Built in support for JSON, TOML, YAML, env, command line, file, S3 etc. Alternative to viper.
Stars: ✭ 450 (+1223.53%)
Mutual labels:  config, configuration-management
Centraldogma
Highly-available version-controlled service configuration repository based on Git, ZooKeeper and HTTP/2
Stars: ✭ 378 (+1011.76%)
Mutual labels:  config, configuration-management
Strictyaml
Type-safe YAML parser and validator.
Stars: ✭ 836 (+2358.82%)
Mutual labels:  config, configuration-management
Nacos
an easy-to-use dynamic service discovery, configuration and service management platform for building cloud native applications.
Stars: ✭ 20,691 (+60755.88%)
Mutual labels:  config, configuration-management
Node No Config
Config and resource loader
Stars: ✭ 45 (+32.35%)
Mutual labels:  config, configuration-management
Config
Library for managing environment variables in Clojure using EDN configuration files
Stars: ✭ 125 (+267.65%)
Mutual labels:  config, configuration-management
Config
Easiest way to add multi-environment yaml settings to Rails, Sinatra, Pandrino and other Ruby projects.
Stars: ✭ 1,821 (+5255.88%)
Mutual labels:  config, configuration-management
ini
📝 Go INI config management. support multi file load, data override merge. parse ENV variable, parse variable reference. Dotenv file parse and loader. INI配置读取管理,支持多文件加载,数据覆盖合并, 解析ENV变量, 解析变量引用。DotEnv 解析加载
Stars: ✭ 72 (+111.76%)
Mutual labels:  config, configuration-management
config-parser
A slim, fully managed C# library for reading/writing .ini, .conf, .cfg etc configuration files.
Stars: ✭ 67 (+97.06%)
Mutual labels:  config, configuration-files

DazzleConf Maven Central Javadoc discord

Prepare to be dazzled

Introduction

It's here. The moment you've been waiting for.

A type-safe, thread-safe, fail-fast, user-oriented, easy to setup, extensible and flexible configuration library.

Objectives

  • Eliminate stringly-typed spaghetti such as getString("key") or getAsInt("section.subsection"). Use your configuration just as you would any other immutable bean.

  • Write defaults once and never bother with them again.

  • Validate configuration in all manners, and fail-fast with informative messages.

  • Easily update old configurations with the latest keys. No need to version config files.

  • Pave the way for users with incredibly flexible type conversion.

  • Take advantage of enums, collections, and nested configuration sections.

Features

  • Lightweight, simple, well-tested library.
  • Immutable and thread safe by design. Values loaded once and never modified thereafter.
  • Readable for programmers and users. Annotation-driven and supports comments.
  • Configuration objects are format-independent.
  • Support for YAML, HOCON, and JSON out of the box, and allows easy extension with more formats.
  • Identify the precise cause of user errors.
  • Use a decoupled and testable config interface.

Usage

Example

@ConfSerialisers(URLSerialiser.class)
public interface MyConfig {

  @DefaultInteger(3)
  int someInteger();
  
  @ConfKey("display.user-message")
  @ConfComments("The message shown when a certain thing happens")
  @DefaultString("Hello user")
  String userMessage();
  
  @ConfKey("display.enable-user-message")
  @DefaultBoolean(true)
  boolean enableUserMessage();
  
  @IntegerRange(min = 1, max = Integer.MAX_VALUE - 1)
  @DefaultLong(10)
  long boundedNumeric();
  
  @DefaultString("ONE")
  MyEnum enumValue();
  
  @SubSection
  NestedSection nestedConfigSection();

  @DefaultString("https://github.com")
  URL validUrl();

}

public enum MyEnum {
  ONE,
  TWO
}


public interface NestedSection {

  @ConfComments("Every annotation shown above works here too")
  @DefaultString("Also, methods are inherited if this interface extends another, enabling inheritable config interfaces")
  String flexibility();

}

When using the YAML configuration format, the following result can be generated by writing the default configuration:

someInteger: 3
display:
  # The message shown when a certain thing happens
  user-message: 'Hello user'
  enable-user-message: true
boundedNumeric: 10
enumValue: 'ONE'
nestedConfigSection:
  # Every annotation shown above works here too
  flexibility: 'Also, methods are inherited if this interface extends another, enabling inheritable config interfaces'
validUrl: 'https://github.com'

The same document can be reparsed to an instance of the configuration interface. Type and constraint validation is performed when config values are parsed and loaded, not when they are retrieved - having an instance of the config interface is enough to ensure the configuration is valid.

Requirements

  • Java 8

Java 11 is recommended, but not required.

module-info files are also included, and these are backwards compatible with Java 8.

Getting Started

This page will help you out: https://github.com/A248/DazzleConf/wiki/Getting-Started

The wiki also has extra examples such as with setting up a reloadable configuration, automatically updating the configuration with the latest keys, and more.

Documentation

See the docs folder of this repository for a detailed overview.

Additionally, the javadocs are published with the artifact. They can also be browsed here.

License

LGPL. See the license file for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].