tr11 / python-configuration

A Python library to load configuration parameters

Home Page:https://tr11.github.io/python-configuration/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Investigation] Limitations of python-configuration that prevent others from adopting it.

movermeyer opened this issue · comments

I've recently been writing a configuration-loading system for a new library. I was copying the system used by coverage-py.
Now that I've stumbled upon python-configuration and I wonder if it might be a better solution.

I'm writing this issue to document what I've discovered, which might give ideas for the future direction of python-configuration.


coverage-py loads its configuration from a hierarchy of locations, including locations in some shared config files (eg. setup.cfg, tox.ini, pyproject.toml).

A few things make their config loading needs different from what ConfigurationSet currently offers:

  • The keys in INI/toml files must have a specific prefix/namespace (coverage:), in order to avoid colliding with the keys of other libraries in the shared config file
  • Once a file is found that contains relevant keys, no other files are considered.
  • Missing files are ignored
  • Configuration options are defined in a schema:
    • Values can have types
    • Unknown keys are raised as exceptions
    • They also have custom type definitions and handlers to parse/convert/deserialize them.

See their documentation or the source for details.

@tr11 , what are you plans on maintaining this library going forward?

@movermeyer , are you interested in forking and co-maintaining with myself if we don't hear back?

@chinghwayu Have you managed to hear back from @tr11 ? Let's not fork unless absolutely necessary.

Unfortunately, I don't have much time to help (I'm already committed to too many other projects right now).
I could do some initial help to get things set up initially, but someone else would have to be the primary maintainer / coder.

@movermeyer haven't heard back

Hey guys, my apologies for the delay getting back to you. Things were a bit crazy at work, but I'm back at actively using and maintaining it.

Great to have you back. Can you push out a release with the recent merges?

Will do! Just need to figure out what's missing on the tests side now to get full coverage