python-consul icon indicating copy to clipboard operation
python-consul copied to clipboard

Ability to set custom prefix instead of: "/v1/kv/"

Open xp-vit opened this issue 7 years ago • 2 comments

consul allows to have different vaults and have custom names for them e.g.:

"/secretvault/dev/" instead of "/v1/kv/". We need to provide the ability to be able to retrieve config values from non-default vaults. this parameter should be configurable in the constructor and per request, I think.

xp-vit avatar Jun 05 '18 21:06 xp-vit

Hi @xp-vit! I've not been keeping up with recent Consul developments. Is it possible to link to the documentation for custom key / value prefixes? I couldn't see it immediately: https://www.consul.io/api/kv.html

cablehead avatar Jul 04 '18 03:07 cablehead

Lines like this: https://github.com/cablehead/python-consul/blob/master/consul/base.py#L553 seem to suppose that your key-value store will be with the prefix "/v1/kv/", which will be true if it's created with this client (since it's hardcoded), but won't necessary be true if it was created in another manner. A settable prefix would be super useful in those cases.

B3tty avatar Aug 13 '19 16:08 B3tty