# Path: librouteros/protocol.py
# def cast_to_api(value: typing.Any) -> str:
#     """Cast python equivalent to API."""
#     mapping = {True: 'yes', False: 'no'}
#     # this is necesary because 1 == True, 0 == False
#     if type(value) == int:
#         return str(value)
#     return mapping.get(value, str(value))
# 
# Path: librouteros/types.py



import typing
from itertools import chain
from librouteros.protocol import (
    cast_to_api,
)
from librouteros.types import (
    QueryGen,
    ResponseIter,
)
# -*- coding: UTF-8 -*-


class Key:

    def __init__(self, name: str):
        self.name = name

    def __eq__(self, other):

# Path: librouteros/protocol.py
# def cast_to_api(value: typing.Any) -> str:
#     """Cast python equivalent to API."""
#     mapping = {True: 'yes', False: 'no'}
#     # this is necesary because 1 == True, 0 == False
#     if type(value) == int:
#         return str(value)
#     return mapping.get(value, str(value))
# 
# Path: librouteros/types.py



# Path: librouteros/query.py
import typing
from itertools import chain
from librouteros.protocol import (
    cast_to_api,
)
from librouteros.types import (
    QueryGen,
    ResponseIter,
)

# -*- coding: UTF-8 -*-


class Key:

    def __init__(self, name: str):
        self.name = name

    def __eq__(self, other):

        yield f'?={self}={cast_to_api(other)}'