class MyResponse: def __init__(self, *args, **kwargs): ... @staticmethod def json(*args, **kwargs): return {'cursor': []}