etcd.response module

class etcd.response.ResponseV2(response, request_verb, request_path)[source]

Bases: object

An object that describes a response for every V2 request.

Parameters:
  • response (requests.models.Response) – Raw Requests response object
  • request_verb (string) – Request verb (‘get’, post’, ‘put’, etc..)
  • request_path (string) – Node key
Returns:

Response object

Return type:

etcd.response.ResponseV2

class etcd.response.ResponseV2AliveDirectoryNode(action, node)[source]

Bases: etcd.response.ResponseV2DirectoryNode

Represents a directory node, which may also be accompanied by children that can be enumerated.

children[source]
initialize(node)[source]
is_collection[source]
class etcd.response.ResponseV2AliveNode(action, node)[source]

Bases: etcd.response.ResponseV2BasicNode

Base-class representing a single, non-deleted node.

initialize(node)[source]
class etcd.response.ResponseV2BasicNode(action, node)[source]

Bases: object

Base-class representing all nodes: deleted, alive, or a collection.

Parameters:
  • action (string) – Action type
  • node (dictionary) – Node dictionary
Returns:

Response object

Return type:

etcd.response.ResponseV2

initialize(node)[source]

This function acts as the constructor for subclasses.

Parameters:node (dictionary) – Node dictionary
is_collection[source]

If the node is a directory, do we have the collection of children nodes?

Return type:bool
is_deleted[source]

Is the node deleted?

Return type:bool
is_directory[source]

Is the node a directory?

Return type:bool
class etcd.response.ResponseV2DeletedDirectoryNode(action, node)[source]

Bases: etcd.response.ResponseV2DirectoryNode

Represents a single DIRECTORY node either appearing in isolation or among siblings.

is_deleted[source]
class etcd.response.ResponseV2DeletedNode(action, node)[source]

Bases: etcd.response.ResponseV2BasicNode

Represents a single, deleted node.

is_deleted[source]
class etcd.response.ResponseV2DirectoryNode(action, node)[source]

Bases: etcd.response.ResponseV2BasicNode

A base-class representing a single directory node.

is_directory[source]