MCPcopy Create free account
hub / github.com/dbunt1tled/python-fast-api / Paginator

Class Paginator

src/core/db/repository.py:102–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100
101
102class Paginator(Generic[T]):
103 def __init__(self, items: Sequence[T], total: int, page: int, per_page: int):
104 self.items = items
105 self.total = total
106 self.page = page
107 self.per_page = per_page
108
109 @property
110 def pages(self) -> int:
111 return (self.total + self.per_page - 1) // self.per_page
112
113
114class BaseRepository(ABC, Generic[T]):

Callers 1

find_allMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected