Please see the README.md and get your consul cluster up and running
requestsFor full documentation, see the Consul http-api
In [20]:
import requests
base_url = 'http://192.168.59.103:8500/v1/kv/'
response = requests.put(base_url + 'key1', data="value1")
print(response.text)
python-consulFor full documentation, see python-consul documentation
In [21]:
from consul import Consul
c = Consul('192.168.59.103')
index, data = c.kv.get('key1')
print(data['Value'].decode('utf8'))
In [ ]: