I have a Pyramid application which I can start using pserve some.ini
. The ini file contains the usual paste configuration and everything works fine. In production, I use uwsgi
, having a paste = config:/path/to/some.ini
entry, which works fine too.
But instead of reading my configuration from a static ini file, I want to retrieve it from some external key value store. Reading the paste
documentation and source code, I figured out, that there is a call
scheme, which calls a python function to retrieve the "settings".
I implemented some get_conf
method and try to start my application using pserve call:my.module:get_conf
. If the module/method do not exist, I get an appropriate error, so the method seems to be used. But whatever I return from the method, I end up with this error message:
AssertionError: Protocol None unknown
I have no idea what return value of the method is expected and how to implement it. I tried to find documentation or examples, but without success. How do I have to implement this method?