Skip to content

How to unpage outside Fastapi #1191

Answered by uriyyo
vunhatchuong asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @vunhatchuong,

You can use set_page and set_params functions:

from fastapi_pagination import Params, set_params, set_page

async def main() -> None:
    async with get_session() as session:
        with (
            set_params(Params(page=1, size=50)),
            set_page(PageOptionalParams[CheckinResponse]),
        ):
            err, checkin_list = await checkin_crud.filter(
                session,
                None,
                ...,
            )

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by vunhatchuong
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants