ssato / python-anyconfig

Python library provides common APIs to load and dump configuration files in various formats
MIT License
279 stars 31 forks source link

Formats and Backends #53

Open txomon opened 7 years ago

txomon commented 7 years ago

I have been looking at the codebase, and it looks like you are calling the formats of the files as backends. However, you also look like willing to implement different backends, such as Environment backend.

Would it be possible to have the code refactored to accept different backends (currently from my point of view only file backend is supported) such as redis, postgres, etc?

To have retrocompatibility, it should be possible to use new backends such as redis, postgres, etc. to load-safe configurations.

Just in case, I am looking at this as a possible implementation of Archaius in python

ssato commented 7 years ago

Thanks for your suggestion!

Technically, it may be possible to add support of them that by extending the current base class of backends, anyconfig.backend.base.Parser. But I feel that it may be difficult to abstract contents in DBs/KV stores from the point of view of semantics.