Skip to content

Pagify is a simple yet flexible Python package for implementing various pagination methods in any dataset or collection. With support for offset, cursor, and page number pagination, Pagify offers a quick and easy way to add pagination to any python applicationogram.

License

Notifications You must be signed in to change notification settings

Mohammad222PR/pagify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pagify Logo

GitHub Stars GitHub Forks GitHub Issues Python Version MIT License Contributors GitHub Repo Size Commit Activity Downloads

Overview

Pagify is a Python package that provides a robust and flexible pagination system suitable for both simple and complex applications. Whether you need pagination for raw Python projects or integration into Django or similar frameworks, pagify delivers straightforward and adaptable solutions.

🌟 Features

  • Multiple Pagination Types:
    • Offset Pagination: Ideal for classic numbered offset and limit scenarios.
    • Cursor Pagination: Efficiently handles large datasets by using cursor-based navigation.
    • Page Number Pagination: Simple page-based pagination for easy implementation.
  • Framework-Agnostic: Can be used in any Python project, from minimal scripts to complex web frameworks.
  • Detailed Pagination Info: Includes next, previous, and current page indicators.
  • JSON Response Formatting: Consistent output formatting with built-in JSON helpers.
  • Customizable and Extensible: Easily extend with custom serializers or formatters.

📚 Documentation

For detailed guides and examples, please refer to the Complete Documentation.

🛠️ Usage

Here's a quick example of how to use pagify in your Python application:

from pagify.adapters.paginate import paginate_with_page_number

queryset = [{'id': i} for i in range(1, 101)]  # Example dataset
result = paginate_with_page_number(queryset, page=2, page_size=10)
print(result)

🤝 Contribution

We welcome contributions! If you'd like to report issues, suggest new features, or contribute code, feel free to open an issue or submit a pull request.

📄 License

pagify is licensed under the MIT License. Check the LICENSE file for more details.

About

Pagify is a simple yet flexible Python package for implementing various pagination methods in any dataset or collection. With support for offset, cursor, and page number pagination, Pagify offers a quick and easy way to add pagination to any python applicationogram.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages