<reponame>miccarrer/copbot<filename>src/objects.py
from src.exceptions import AppException


def init_from_kwargs(obj, kwargs):
    for arg in kwargs:
        if hasattr(obj, arg):
            setattr(obj, arg, kwargs[arg])
        else:
            raise AppException(f'{arg} does not exist')
from src.exceptions import AppException


def init_from_kwargs(obj, kwargs):
    for arg in kwargs:
        if hasattr(obj, arg):
            setattr(obj, arg, kwargs[arg])
        else:
            raise AppException(f'{arg} does not exist')