pureconfig | A boilerplate-free library for loading configuration files | Configuration Management library

 by   pureconfig Scala Version: v0.17.2 License: MPL-2.0

kandi X-RAY | pureconfig Summary

kandi X-RAY | pureconfig Summary

pureconfig is a Scala library typically used in Devops, Configuration Management applications. pureconfig has no bugs, it has no vulnerabilities, it has a Weak Copyleft License and it has medium support. You can download it from GitHub.

PureConfig is a Scala library for loading configuration files. It reads Typesafe Config configurations written in HOCON, Java .properties, or JSON to native Scala classes in a boilerplate-free way. Sealed traits, case classes, collections, optional values, and many other types are all supported out-of-the-box. Users also have many ways to add support for custom types or customize existing ones.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              pureconfig has a medium active ecosystem.
              It has 1366 star(s) with 166 fork(s). There are 20 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 34 open issues and 244 have been closed. On average issues are closed in 166 days. There are 10 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of pureconfig is v0.17.2

            kandi-Quality Quality

              pureconfig has 0 bugs and 0 code smells.

            kandi-Security Security

              pureconfig has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              pureconfig code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              pureconfig is licensed under the MPL-2.0 License. This license is Weak Copyleft.
              Weak Copyleft licenses have some restrictions, but you can use them in commercial projects.

            kandi-Reuse Reuse

              pureconfig releases are not available. You will need to build from source code and install.
              Installation instructions, examples and code snippets are available.
              It has 9598 lines of code, 674 functions and 195 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of pureconfig
            Get all kandi verified functions for this library.

            pureconfig Key Features

            No Key Features are available at this moment for pureconfig.

            pureconfig Examples and Code Snippets

            No Code Snippets are available at this moment for pureconfig.

            Community Discussions

            QUESTION

            Shapeless error while trying trying to use PureConfig and Circe for scala
            Asked 2022-Apr-15 at 07:17

            shapeless.DefaultSymbolicLabelling shapeless.DefaultSymbolicLabelling$.instance(shapeless.HList) getting this error while using both pureconfig and circe. I'm using spark 3.1.2 with spark k8s operator.

            ...

            ANSWER

            Answered 2022-Apr-15 at 07:17

            This error is because of conflicting shapeless library versions. Spark 3.1.2 ships with shapeless 2.3.3 whereas both these packages need shapeless 2.3.7. To solve this I followed the steps mentioned here which involve shading ie renaming the dependency.

            For SBT

            If you are using the sbt-assembly plugin to create your JARs you can shade shapeless by adding to your assembly.sbt file the following setting:

            Source https://stackoverflow.com/questions/71881149

            QUESTION

            Using generic type with PureConfig in Scala
            Asked 2021-Dec-20 at 16:27

            I'm trying to call PureConfig's loadOrThrow from method with generic type:

            ...

            ANSWER

            Answered 2021-Dec-20 at 16:27

            To summarize comments and explain how this codec thing works.

            When you do:

            Source https://stackoverflow.com/questions/70423473

            QUESTION

            Pureconfig - is it possible to include in conf file another conf file?
            Asked 2021-Jul-16 at 16:17

            Is it possible to include in *conf file another conf file?

            Current implementation:

            ...

            ANSWER

            Answered 2021-Jul-16 at 16:17

            Pureconfig uses HOCON (though some of the interpretation of things like durations differ). HOCON include is supported.

            So assuming that you have model1.conf in your resources (e.g. src/main/resources), all you need in db-writer.conf is

            Source https://stackoverflow.com/questions/68411688

            QUESTION

            Scala: How to load environment variables into Application.conf using scala?
            Asked 2021-Jan-16 at 17:45

            I have a ConfigLoader which I'm pretty sure works fine. I suspect I am not using application.conf file correctly or perhaps my directory containing the prd.env and dev.env is not in the correct place.

            What I expect to happen:

            I when I enter sbt run the ConfigLoader reads the application.conf file, sees there are variables within that file. Then checks if prd.env or dev.env depending on which environment it is in and then finally loads the variables. I want this so I can have a different database for dev and prd.

            1. I have not idea how it would find the Meta directory which contains the prd.env and dev.env (see image).
            2. I have no idea how it would be able to tell whether if the environment is in dev or prd.
            3. The goal is to now look towards deploying this app, which is why I need these environment variables to work.

            I really appreciate all the help but please try and detail your answers because I am really stuck and short answers often assume I know more than I do. Thanks :)

            Tech stack incase relevant:

            • HTTP4S,
            • CATS,
            • Doobie,
            • PostgreSQL

            application.conf file below:

            ...

            ANSWER

            Answered 2021-Jan-16 at 16:34

            When running via sbt run, the environment is set by the shell in which you're running sbt. Defining a dev.env file by itself does nothing.

            The mechanism for setting the environment in which sbt is running will vary depending on your shell.

            For example if bash is your shell (this is worth trying in other Bourne-compatible shells), prefixing the environment variables with export, e.g.:

            Source https://stackoverflow.com/questions/65750394

            QUESTION

            Parsing an empty property into an empty Map with PureConfig
            Asked 2021-Jan-12 at 16:05

            I have a case class like the following:

            ...

            ANSWER

            Answered 2021-Jan-12 at 15:49

            As @LuisMiguelMejíaSuárez suggested in the comment, you should add a default argument:

            Source https://stackoverflow.com/questions/65686354

            QUESTION

            Scala, PureConfig - how to read json config file?
            Asked 2020-Dec-02 at 15:14

            I have a simple config.json file in my resources:

            ...

            ANSWER

            Answered 2020-Dec-02 at 15:14

            Your case classes don't match JSON. It should be something more like:

            Source https://stackoverflow.com/questions/65110294

            QUESTION

            New sbt application using the akka-http template, how to determine resolvers and add maven central?
            Asked 2020-Oct-30 at 03:04

            I have a new sbt application that I built using the akka http g8 template.

            I am trying to add reactivemongo 1.0 to my build and I am getting this error:

            ...

            ANSWER

            Answered 2020-Oct-30 at 03:04

            Can you try replacing "org.reactivemongo" %% "reactivemongo" % "1.0" with "org.reactivemongo" %% "reactivemongo" % "1.0.0" % "provided"?

            I copy it from Maven Repository https://mvnrepository.com/artifact/org.reactivemongo/reactivemongo_2.13/1.0.0

            Source https://stackoverflow.com/questions/64599593

            QUESTION

            Pureconfig read config as properties map
            Asked 2020-Oct-17 at 09:23

            Is it possible to make pureconfig read properties as Map[String, String]? I have the following

            application.conf:

            ...

            ANSWER

            Answered 2020-Oct-16 at 22:04

            Your issue is not pureconfig. Your issue is that by HOCON spec what you wrote:

            Source https://stackoverflow.com/questions/64395800

            QUESTION

            force pureconfig to use -dconfig.file application.conf file and not resource application.conf
            Asked 2020-Sep-29 at 21:03

            I have the following application.conf file:

            ...

            ANSWER

            Answered 2020-Sep-29 at 21:03

            The problem is the call

            Source https://stackoverflow.com/questions/64127047

            QUESTION

            Read Hocon config as a Map[String, String] with key in dot notation and value
            Asked 2020-Sep-26 at 20:18

            I have following HOCON config:

            ...

            ANSWER

            Answered 2020-Sep-20 at 14:05

            You can do the same without using recursion. Use method entrySet as following

            Source https://stackoverflow.com/questions/63964237

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install pureconfig

            To use PureConfig in an existing SBT project with Scala 2.12 or a later version, add the following dependency to your build.sbt:. For a full example of build.sbt you can have a look at this build.sbt. Earlier versions of Scala had bugs which can cause subtle compile-time problems in PureConfig. As a result we recommend only using the latest Scala versions within the minor series.

            Support

            Please see the full PureConfig documentation for more information.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/pureconfig/pureconfig.git

          • CLI

            gh repo clone pureconfig/pureconfig

          • sshUrl

            git@github.com:pureconfig/pureconfig.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Configuration Management Libraries

            dotfiles

            by mathiasbynens

            consul

            by hashicorp

            viper

            by spf13

            eureka

            by Netflix

            confd

            by kelseyhightower

            Try Top Libraries by pureconfig

            pureconfig.github.io

            by pureconfigJavaScript