get_config in Ansible 2.5.0 API

I have some lookup plugins that I’d like to move to Ansible 2.5.0.

Parts of the code:
imports:

from ansible.constants import p, get_config

and then in the code I can do:

passwordstate_uri = get_config(p, passwordstate_config, "passwordstate_uri", "PASSWORDSTATE_URI","")

This would read the "passwordstate_uri from ansible config, or optionally the PASSWORDSTATE_URI envvar. However, in Ansible 2.5.0 all of this is gone.
What’s the recommended way to read from ansible.cfg in Ansible 2.5.0?

I’m assuming that this is related: https://github.com/ansible/ansible/issues/25820

I'm writing the new docs, but the short, DONT use get_config, use
self.get_option('passwordstate_uri') after you define the option in
the DOCUMENTATION variable inside the lookup

in this example
https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/lookup/redis.py#L7

you can see how to define ini entries and env vars that the lookup can consume.

awesome, thanks for the quick reply!!

the new api looks super-clean btw, sweet!