def api_route(api_path, method="GET"):
    """Decorate a function as API route/command."""

    def decorate(func):
        func.api_path = api_path
        func.api_method = method
        return func

    return decorate