Coder Social home page Coder Social logo

markusressel / container-app-conf Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 5.0 250 KB

Convenient configuration of containerized applications

License: MIT License

Python 100.00%
config configuration container convenient docker easy env environment hacktoberfest json simple singleton toml types validation yaml

container-app-conf's Introduction

GitHub Streak

GitHub stats

Top Langs

container-app-conf's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar markusressel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

container-app-conf's Issues

Get printable description of current configuration

Is your feature request related to a problem? Please describe.
Oftentimes it is very useful to output the current configuration of an application while it is running though logs or other means.

Describe the solution you'd like
Provide a method to generate a printable description of the current configuration. This method should take a generator (DataSource?) to provide more flexibility to the way the output is generated.

Additional context
Depends on #30

Do not write reference automatically

Is your feature request related to a problem? Please describe.
In most situations it is not a good idea to automatically write a reference config to the current directory. F. ex. in CLI applications this can lead to reference files being written all over the place. When instantiating a config manually it can also be quite irritating if reference configs are generated. In such situations it is cumbersome to manually disable reference generation on every instantiation manually.

Describe the solution you'd like
Remove automatic reference generation and provide a public method to do this instead. This method should be accessible from the ConfigBase class or even a "util" method. This would provide more control to the dev on when and how a reference is generated.

Mark configuration options as "secret"

Is your feature request related to a problem? Please describe.
Outputting the current configuration can leak secrets.

Describe the solution you'd like
Allow developers to mark individual config entries as secret. This information needs to be used in #29 to replace the values of such entries with a placeholder when generating the output.

Add expected range to error message

Describe the bug
When passing a value that is not in the expected range the error message does not print the range which makes it difficult to know what should be entered.

Expected behavior
Print the expected range.

Automatically load data source values

Is your feature request related to a problem? Please describe.
When using a custom YAML data source the dev has to call load() manually which is cumbersome and easy to forget.

Describe the solution you'd like
Automatically load values of data sources when loading config.

none_allowed is not validated

Describe the bug
When speciying a ConfigEntry without a default or none_allowed=False no exception is raised when no value is specified in the config.

Allow passing config entry values in constructor

Is your feature request related to a problem? Please describe.
Constructing a configuration from code is currently quite hard, since one would have to create an instance without validation and manually change config entry values afterwards using property access. This can lead to confusion if those manual changes are done in a different place.

Describe the solution you'd like
Allow devs to pass config values using a constructor parameter.

Make singleton behaviour optional

Is your feature request related to a problem? Please describe.
It can be useful to be able to actually have multiple instances of a single config subclass, f.ex. for testing or when running multiple instances of the same program with different configurations.

Describe the solution you'd like
Allow devs to disable the singleton behaviour using a simple constructor parameter.

Add option to ignore case in config keys

Is your feature request related to a problem? Please describe.
Writing config files in CamelCase and env vars in caps can be cumbersome and errorprone.

Describe the solution you'd like
Add an option to ignore case to the datasources.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.