Comments (8)
@sakthiRathinam Could you please provide more context? It will be great if you can provide example of what you want
from fastapi-pagination.
i need whether the previous and next page of that paginate is available...some bool like prev:True ,next:False like this
from fastapi-pagination.
In case if prev
or next
page is not available you will receive None
as a value.
from fastapi-pagination.
but im nt getting anything like prev or next
from fastapi-pagination.
{
"items": [
{
"id": 2147483647,
"created": "2021-10-19T09:50:00.207Z",
"updated": "2021-10-19T09:50:00.207Z",
"max_retial_price": 0,
"type": "Capsules",
"title": "string",
"brand": "string",
"active": false
}
],
"total": 0,
"page": 1,
"size": 1
}
from fastapi-pagination.
total": 0,
"page": 1,
"size": 1 this three extra fields only im gettting
from fastapi-pagination.
@clinto_router.get('/paginateMedicines', response_model=Page[GET_Medicine])
async def paginate_mediciens(request: Request) -> any:
medicines = await paginate(Medicine.all())
im using fastapi and tortoise-orm
from fastapi-pagination.
Hi @sakthiRathinam,
Try import Page
from fastapi_pagination.links
:
from fastapi_pagination.links import Page
@clinto_router.get('/paginateMedicines', response_model=Page[GET_Medicine])
async def paginate_mediciens(request: Request) -> any:
medicines = await paginate(Medicine.all())
from fastapi-pagination.
Related Issues (20)
- Does not work when model has unhashable columns HOT 3
- AssertionError: missing pagination params HOT 2
- Getting `ResponseValidationError` HOT 7
- Paginate SQLalchemy ORM model and return a Custom Pydantic Model as response HOT 9
- Make fastapi-pagination bundle with sqlakeyset (sqlakeyset is not installed Error) HOT 1
- How to remove or rename CustomizedPage... in schema HOT 5
- CursorPage returns total always null HOT 2
- Cursor Pagination - Invalid cursor value HOT 9
- Version `0.12.18` breaks pydantic resolution HOT 7
- How to paginate raw SQLAlchemy query HOT 1
- 0.12.20 breaks code that uses fastapi_pagination.ext.sqlalchemy.paginate_query HOT 3
- Add query params into the Page HOT 7
- CustomizedPage in pytest returns "RuntimeError: Use params or add_pagination" HOT 4
- Using Python reserved keyword for parameter alias causes error on start up HOT 5
- Using add_pagination breaks the custom OpenAPI configuration. HOT 4
- Invalid OAS file generation for Page HOT 2
- DeprecationWarning: `with_custom_options` method is deprecated, please use `fastapi_pagination.customization.CustomizePage` instead. This method will be removed in the next major release (0.13.0). HOT 1
- Add limit to CursorParams.size field HOT 3
- Move to newest version of pytest-asyncio HOT 1
- Cursor pagination, sqlalchemy and lazy joined HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fastapi-pagination.