def get_limit(self, request):
        if self.limit_query_param:
            try:
                return _positive_int(
                    request.query_params[self.limit_query_param],
                    cutoff=self.max_limit
                )
            except (KeyError, __HOLE__):
                pass

        return self.default_limit
dataset/ETHPy150Open tomchristie/django-rest-framework/rest_framework/pagination.py/LimitOffsetPagination.get_limit