Skip to content

0.12.18

Compare
Choose a tag to compare
@uriyyo uriyyo released this 04 Mar 18:19
· 463 commits to main since this release
19bb7d5
  • 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),
]