Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Configuration class can use structured environment variables #9

@ethanrowe

Description

@ethanrowe

Mandrel should offer a configuration class variant that expects to get its attributes from environment variables.

There are a number of ways one could go about this. Certainly would could provide functionality to reduce environment variables down to a basic native (nested) dictionary, which could be used as the initial dict for a Configuration instance. However, it would probably be more idiomatic if the thing were a configuration class in its own right, which all other configuration extensions could use just by chaining.

The point is we want to be able to say things like:

  • this variable is this attribute, and it should be an integer
  • this variable is this attribute, and it should be a comma-separated list of strings
  • variables with this prefix are a nested dict (which is a complicated case)

And so on.

This requires some thought.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions