Fastapi-pagination

Latest version: v0.12.32

Safety actively analyzes 681812 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 11

0.12.32

* Add support for `sqlalchemy` `CompoundSelect`. [1361](https://github.com/uriyyo/fastapi-pagination/pull/1361)

0.12.31

* Add `NotImplementedError` to ignored exc when resolving `unwrap-mode`. [1324](https://github.com/uriyyo/fastapi-pagination/issues/1324)

0.12.30

* Fix issue when `select` model with single field. [1317](https://github.com/uriyyo/fastapi-pagination/pull/1317)


**NOTE!** This is last release before `0.13.0` version.

0.12.29

* Fix issue with `sqlalchemy` scalar select detection. [1313](https://github.com/uriyyo/fastapi-pagination/pull/1313)
* Add unwrap mode for `sqlalchemy` ext. [1316](https://github.com/uriyyo/fastapi-pagination/pull/1316)

New Feature

`sqlalchemy` `unwrap_mode` allows you to control how to unwrap result rows before passing them to items transformer
and page creation.

`unwrap_mode` can be set to one of the following values:
* `None` - will use `auto` mode for default queries, and `legacy` for `text` and `from_statement` queries.
* `"auto"` - will unwrap only in case if you are selecting single model.
* `"legacy"` - will use old behavior, where row will be unwrapped if it contains only one element.
* `"unwrap"` - will always unwrap row, even if it contains multiple elements.
* `"no-unwrap"` - will never unwrap row, even if it contains only one element.

0.12.28

* Add better logic for `sqlalchemy` scalars unwrapping. [1281](https://github.com/uriyyo/fastapi-pagination/pull/1281)
* Fix issue with `sqlalchemy` imports for `gino` ext. [1282](https://github.com/uriyyo/fastapi-pagination/pull/1282)
* Fix issue with incorrect body schema. [1299](https://github.com/uriyyo/fastapi-pagination/issues/1299)

Breaking changes

`sqlachemy` extension no longer requires to use `items_transformer` when selecting scalar field:

This code is no longer valid:
py
paginate(session, select(User.name), transformer=lambda items: [{'name': item} for item in items])


The correct version now is:
py
paginate(session, select(User.name))

0.12.27

* Bump to next `pytest-asyncio` version. [1118](https://github.com/uriyyo/fastapi-pagination/issues/1118)
* Bump to next `fastapi` version. [1275](https://github.com/uriyyo/fastapi-pagination/pull/1275)
* Support total parameter for `tortoise` ext. [1269](https://github.com/uriyyo/fastapi-pagination/pull/1269)
* Add support for `sqlalchemy` from statement. [1277](https://github.com/uriyyo/fastapi-pagination/pull/1277)

Page 1 of 11

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.