consul.base module¶
- class consul.base.Response(code, headers, body)¶
Bases:
tupleCreate new instance of Response(code, headers, body)
- body¶
Alias for field number 2
- code¶
Alias for field number 0
- headers¶
Alias for field number 1
- class consul.base.HTTPClient(host='127.0.0.1', port=8500, scheme='http', verify=True, cert=None)[source]¶
Bases:
object
- class consul.base.Consul(host=None, port=None, token=None, scheme=None, consistency='default', dc=None, verify=None, cert=None)[source]¶
Bases:
objecttoken is an optional `ACL token`_. If supplied it will be used by default for all requests made with this client session. It’s still possible to override this token by passing a token explicitly for a request.
consistency sets the consistency mode to use by default for all reads that support the consistency option. It’s still possible to override this by passing explicitly for a given request. consistency can be either ‘default’, ‘consistent’ or ‘stale’.
dc is the datacenter that this agent will communicate with. By default the datacenter of the host is used.
verify is whether to verify the SSL certificate for HTTPS requests
cert client side certificates for HTTPS requests
- Parameters: