zcollection.meta.Pair#

class zcollection.meta.Pair(name, value)[source]#

Bases: ABC

Handle pair key/value.

Parameters:
  • name (str) – name of the key.

  • value (Any) – value of the key.

Attributes

name

Name of the key.

value

Value of the key.

Public Methods

from_config(data)

Create a new Pair from the given key/value pair configuration.

get_config()

Get the key/value pair configuration.

Protected Methods

_abc_impl

_encode(value)

Encode an attribute value as something that can be serialized as JSON.

Special Methods

__eq__(other)

Return self==value.

__repr__()

Return repr(self).