Skip to content

Support Immutable config object #39

Description

@akalex

It would be nice if I could have the possibility to set that the config object is immutable once I loaded all needed configuration files. In that case, I can be sure that my configuration won't be changed during runtime.
Just an example of it could be used

from pymlconf import Root, freeze

config = Root()
for yml_file in CONFIG_PATHS:
    if yml_file.exists():
        config.loadfile(str(yml_file))
freeze(config)

config.foo = "bar"

TypeError is raised

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions