FastAPI pagination
Project description
FastAPI Pagination
Installation
# Basic version
pip install fastapi-pagination
# All available integrations
pip install fastapi-pagination[all]
Available integrations:
Example
from fastapi import FastAPI
from pydantic import BaseModel
from fastapi_pagination import Page, add_pagination, paginate
app = FastAPI()
class User(BaseModel):
name: str
surname: str
users = [
User(name='Yurii', surname='Karabas'),
# ...
]
@app.get('/users', response_model=Page[User])
async def get_users():
return paginate(users)
add_pagination(app)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for fastapi_pagination-0.7.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94f007f26ad754825f13ac4a6c775041a265a8807cd313d810d33beff9db0744 |
|
MD5 | f37e6e5c29cf6f3bbf7393135e730341 |
|
BLAKE2b-256 | 5190dfd2bc9dd9da7a74be8067cbed0456b5e47609ea171037308d6c6be495a1 |