Skip to main content

FastAPI extended pagination

Project description

FastAPI Pagination

License codecov PYPI

Installation

# Basic version
pip install fastapi-paginate

# All available integrations
pip install fastapi-paginate[all]

Available integrations:

Example

from fastapi import FastAPI
from pydantic import BaseModel

from fastapi_paginate 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)

This repo is forked from fastapi-pagination. Although original repository is already good enough, but I modified it according to my needs and published thinking it might be helpful for some.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fastapi-paginate-0.1.0.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

fastapi_paginate-0.1.0-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

Details for the file fastapi-paginate-0.1.0.tar.gz.

File metadata

  • Download URL: fastapi-paginate-0.1.0.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.7.12 Linux/5.13.0-1021-azure

File hashes

Hashes for fastapi-paginate-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4f1928d7993f67d5f215b5b1d71b59a82dc53ef1f10123daa4882801756bc63a
MD5 14c26178808a4cdad50e71e6994dfda7
BLAKE2b-256 f873063b235e3cfdcba5f59018dcd436dcf46a23ae4dec8fddb04d888e77124f

See more details on using hashes here.

File details

Details for the file fastapi_paginate-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: fastapi_paginate-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.7.12 Linux/5.13.0-1021-azure

File hashes

Hashes for fastapi_paginate-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f24c3b3e03b92c3165eb8a2f26efd41ad78a8117e7d0525460405fd9f48a5b2e
MD5 74c85520788c36b2ef067c5dcc0a3823
BLAKE2b-256 fd0cf950720d734cf89f0d426181ba7d124215e7791afa7557797b6d330556c8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page