FutureConfig - core

FutureConfig format core. It contains java parser and java class builder for the format, and a configuration class for loading the config in your project

Лицензия

Лицензия

Категории

Категории

config Библиотеки уровня приложения Configuration Ninja Взаимодействие с пользователем Веб-фреймворки
Группа

Группа

ninja.fido.config
Идентификатор

Идентификатор

core
Последняя версия

Последняя версия

1.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

FutureConfig - core
FutureConfig format core. It contains java parser and java class builder for the format, and a configuration class for loading the config in your project
Ссылка на сайт

Ссылка на сайт

https://github.com/F-I-D-O/Future-Config
Система контроля версий

Система контроля версий

https://github.com/F-I-D-O/Future-Config

Скачать core

Имя Файла Размер
core-1.0.pom
core-1.0.jar 30 KB
core-1.0-sources.jar 16 KB
core-1.0-javadoc.jar 87 KB
Обзор

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/ninja.fido.config/core/ -->
<dependency>
    <groupId>ninja.fido.config</groupId>
    <artifactId>core</artifactId>
    <version>1.0</version>
</dependency>
// https://jarcasting.com/artifacts/ninja.fido.config/core/
implementation 'ninja.fido.config:core:1.0'
// https://jarcasting.com/artifacts/ninja.fido.config/core/
implementation ("ninja.fido.config:core:1.0")
'ninja.fido.config:core:jar:1.0'
<dependency org="ninja.fido.config" name="core" rev="1.0">
  <artifact name="core" type="jar" />
</dependency>
@Grapes(
@Grab(group='ninja.fido.config', module='core', version='1.0')
)
libraryDependencies += "ninja.fido.config" % "core" % "1.0"
[ninja.fido.config/core "1.0"]

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
ch.qos.logback : logback-classic jar 1.2.3
com.google.guava : guava jar 21.0

test (2)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12
ninja.fido.debug » test-resources jar 1.0-SNAPSHOT

Модули Проекта

Данный проект не имеет модулей.

Future-Config

Future config is a configuration format and a set of libraries to use the config files. Currently supported languages are Python and Java.

Why another config format?

Future-Config is designed for complicated projects with dozens or hundereds configurable properties that needs to be appropriately structured. If you want simple config files, you should opt for some well-established alternative. The differenc ebetween Future-Config and other config/text formats is displayed in table bellow:

Future-Config ini XML YAML TOML JSON
Simple Datatypes yes yes yes yes yes yes
Objects yes yes yes yes yes yes
Arrays yes no yes yes yes yes
Variables yes no no no no no
Comments yes yes yes yes yes no
Config Inheritance yes no no no no no
Config Class Generation yes no yes yes no yes
Unlimited Hierarchy yes no yes yes yes yes

Usage

Python

  1. pip install fconfig
  2. Create your master config file in your project's resources
  3. Generate config classes:
    from fconfig import configuration
    configuration.generate_config()
    
  4. Use the generated config classes:
    import yourproject.confi.zourproject_config.config
    

Java

Syntax

Base Types

string: "String"

int: 1

float: 1.0

boolean: true

negative_int: -3

negative_float: -2.0

Objects

object:
{
	string: 'test'
	integer: 9
	float: 1.23
}

Arrays

array:
[
	1
	5
	6
]

Variables

string: 'string'

composed_string: 'composed ' + $string

Complex Example

object_hierarchy:
{
	inner_object:
	{
		integer: 987654
		composed: $string + ' is funny to compose'
		inner_inner_object:
		{
			float: 9.87654
			composed: $object_hierarchy.inner_object.composed + ' multiple times'
			array:
			[
				1
				2
				3
			]
		}
		boolean: false
	}
	another_string: 'another_string'

	array_of_objects:
	[
		{
			animal: "bear"
			legs: 4
		}
		{
			animal: "chicken"
			legs: 2
		}
	]
}

Версии библиотеки

Версия
1.0