Skip to content

Releases: uriyyo/fastapi-pagination

0.12.24

26 Apr 18:21
b865ce3
Compare
Choose a tag to compare
  • Improve resolve_params exc message. #1129
  • Add odmantic integration. #1130

0.12.23

17 Apr 15:55
16969d0
Compare
Choose a tag to compare
  • 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

06 Apr 14:30
d52fe53
Compare
Choose a tag to compare
  • Fix issue when custom OpenAPI schema is overrided. #1105
  • Fix issue when params field name is keyword. #1112

0.12.21

19 Mar 20:19
ef212e0
Compare
Choose a tag to compare
  • Return fastapi.ext.sqlalchemy.paginate_query function. #1093

0.12.20

19 Mar 09:20
a7a9668
Compare
Choose a tag to compare
  • Add ability to paginate raw sqlalchemy queries. #1085

0.12.19

05 Mar 12:30
b25f688
Compare
Choose a tag to compare
  • Suppress undefined annotation exception for pydantic v2. #1069

0.12.18

04 Mar 18:19
19bb7d5
Compare
Choose a tag to compare
  • 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),
]

0.12.17

22 Feb 08:17
49c3f4d
Compare
Choose a tag to compare
  • Add async analog of default paginate. #1039
  • Fix piccolo issue when filter by foreign field. #1038

0.12.16

19 Feb 09:56
5af275f
Compare
Choose a tag to compare
  • Add set_params function. #1029

0.12.15

11 Feb 13:08
Compare
Choose a tag to compare
  • Add python 3.12 official support. #1023
  • Fix issue with paginate empty sequence using optional params. #1022