def pagination_input(request, default_limit=10, max_limit=100):
    """
    Get pagination data needed to pass to backend for pagination
    """

    page = request.GET.get("page", 1)
    limit = request.GET.get("limit", default_limit)

    # default value does not ensure that param is valid or convertible to int
    try:
        page = abs(int(page))
    except ValueError:
        page = 1
    try:
        limit = abs(int(limit))
    except ValueError:
        limit = default_limit

    if limit > max_limit:
        limit = max_limit
    start = (page * limit) - limit
    return start, page, limit