Configrity is a configuration library for Scala 2.10 or +. Configuration instances are immutable, thread-safe and allow functional design patterns, such as:
The API is stable and covered by tests.
import org.streum.configrity._
val config = Configuration.load( "server.conf" )
val hostname = config[String]("host")
val port = config[Int]("port")
val updatedConfig = config.set ("port",8080 )
upddatedConfig.save( "local.conf" )
import org.streum.configrity._
imports all you need.include
directive is supported, adding compatibility with Akka and
Configgy configurations files.Configrity depends on Scala 2.10 or newer.
While core features do not depend on external libraries, some modules may. In that case, the approriate dependencies will be automatically installed by sbt/maven.
The dependency line is:
"org.streum" %% "configrity-core" % "1.0.0"
Additional modules require addition dependency lines. Check the wiki for more information: https://github.com/paradigmatic/Configrity/wiki/Modules
Follow the repository instructions.
To install Configrity you just need a working java installation (tested with JDK 1.6 and 1.7, but may work with 1.5) and SBT 0.13.5:
$ git clone git://github.com/paradigmatic/Configrity.git
$ cd Configrity
$ sbt
> test
> doc
> package
See the wiki: https://github.com/paradigmatic/Configrity/wiki
A scaladoc reference can be found online: http://paradigmatic.github.com/Configrity/
You can github issues tracker, to report bugs or to ask for new features:
https://github.com/paradigmatic/Configrity/issues
Patches are gladly accepted from their original author. Along with any patches, please state that the patch is your original work and that you license the work to the Configrity project under the LGPLv3 or a compatible license.
To propose a patch, fork the project and send a pull request via github. Tests are appreciated.
Configrity is a free and open source library released under the
permissive GNU LesserGPLv3 license (see LICENSE.txt
).
Copyright (C) 2011-2014. Paradigmatic. All rights reserved.