Releases: uriyyo/fastapi-pagination
Releases Β· uriyyo/fastapi-pagination
0.12.24
0.12.23
- Add limit to CursorParams.size field. #1119
- Strip extra lines before and after the
_WARNING_MSG
. #1117
Thanks to @barsikus007 and @frost-nzcr4!
Breaking changes:
CursorPage
now has default upper limit for size
query param (size should be <= 100).
If you want to remove this restriction and use old behavior, you can customize CursorPage
:
from fastapi_pagination.cursor import CursorPage as BaseCursorPage
from fastapi_pagination.customization import UseParamsFields, CustomizedPage
CursorPage = CustomizedPage[
BaseCursorPage,
UseParamsFields(
size=Query(50, ge=0),
),
]
0.12.22
0.12.21
0.12.20
0.12.19
0.12.18
- Bump 'beanie' version. #1043
- Add better exception message for
sqlalchemy
non-hashable rows. #1048 - Implement new page customization. #1046
Important changes
Current release changes way how to customize page. New customization allows to customize pages in typing-compatible way that will not require to use # type: ignore
or if TYPE_CHECKING
workarounds, for more information, please check docs - link.
Old way
from fastapi_pagination import Page
CustomPage = Page.with_custom_options(
cls_name="CustomPage",
size=10,
)
New way:
from fastapi_pagination import Page
from fastapi_pagination.customization import CustomizedPage, UseName, UseParamsFields
CustomPage = CustomizedPage[
Page,
UseName("CustomPage"),
UseParamsFields(size=10),
]