Skip to content

How to access page/size param values? #656

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

You must be logged in to vote

Hi @shawnwall,

You can use resolve_params function inside endpoint function:

from fastapi_pagination import Params, resolve_params


@app.get('/users', response_model=Page[UserOut])
async def get_users():
    params: Params = resolve_params() 

    return paginate(users)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by shawnwall
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