Module elastiknn.codec

Mixin for API objects that can be converted to a dict compatible with the Elastiknn Json API.

Expand source code
"""Mixin for API objects that can be converted to a dict compatible with the Elastiknn Json API."""

from typing import Dict


class Codec(object):
    """Mixin for API objects that can be converted to a dict compatible with the Elastiknn Json API."""

    def to_dict(self) -> Dict:
        """Return a dictionary compatible with the Elastiknn Json API."""
        raise NotImplementedError

Classes

class Codec

Mixin for API objects that can be converted to a dict compatible with the Elastiknn Json API.

Expand source code
class Codec(object):
    """Mixin for API objects that can be converted to a dict compatible with the Elastiknn Json API."""

    def to_dict(self) -> Dict:
        """Return a dictionary compatible with the Elastiknn Json API."""
        raise NotImplementedError

Subclasses

Methods

def to_dict(self) -> Dict

Return a dictionary compatible with the Elastiknn Json API.

Expand source code
def to_dict(self) -> Dict:
    """Return a dictionary compatible with the Elastiknn Json API."""
    raise NotImplementedError