def get_page_size(self, request):
        if self.page_size_query_param:
            try:
                return _positive_int(
                    request.query_params[self.page_size_query_param],
                    strict=True,
                    cutoff=self.max_page_size
                )
            except (__HOLE__, ValueError):
                pass

        return self.page_size
dataset/ETHPy150Open tomchristie/django-rest-framework/rest_framework/pagination.py/PageNumberPagination.get_page_size